Spaces:
Paused
Paused
smellslikeml commited on
Commit ·
14bb913
1
Parent(s): 5c03fa6
update app
Browse files
app.py
CHANGED
|
@@ -67,7 +67,7 @@ def compute(image, prompt):
|
|
| 67 |
|
| 68 |
logging.info('output="%s"', output)
|
| 69 |
|
| 70 |
-
return output
|
| 71 |
|
| 72 |
def reset():
|
| 73 |
"""Resets the input fields."""
|
|
@@ -92,7 +92,7 @@ def create_app():
|
|
| 92 |
run.click(
|
| 93 |
fn=compute,
|
| 94 |
inputs=[image, prompt],
|
| 95 |
-
outputs=highlighted_text,
|
| 96 |
)
|
| 97 |
clear.click(fn=reset, inputs=None, outputs=[prompt, image])
|
| 98 |
|
|
@@ -100,7 +100,7 @@ def create_app():
|
|
| 100 |
status = gr.Markdown(f"Startup: {datetime.datetime.now()}")
|
| 101 |
gpu_kind = gr.Markdown(f"GPU=?")
|
| 102 |
demo.load(
|
| 103 |
-
fn=lambda:
|
| 104 |
inputs=None,
|
| 105 |
outputs=model_info,
|
| 106 |
)
|
|
|
|
| 67 |
|
| 68 |
logging.info('output="%s"', output)
|
| 69 |
|
| 70 |
+
return output # Ensure that output is a string
|
| 71 |
|
| 72 |
def reset():
|
| 73 |
"""Resets the input fields."""
|
|
|
|
| 92 |
run.click(
|
| 93 |
fn=compute,
|
| 94 |
inputs=[image, prompt],
|
| 95 |
+
outputs=highlighted_text, # Ensure this is the right output component
|
| 96 |
)
|
| 97 |
clear.click(fn=reset, inputs=None, outputs=[prompt, image])
|
| 98 |
|
|
|
|
| 100 |
status = gr.Markdown(f"Startup: {datetime.datetime.now()}")
|
| 101 |
gpu_kind = gr.Markdown(f"GPU=?")
|
| 102 |
demo.load(
|
| 103 |
+
fn=lambda: f"Model `{MODEL_LOCATION}` loaded.", # Ensure the output is a string
|
| 104 |
inputs=None,
|
| 105 |
outputs=model_info,
|
| 106 |
)
|