Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -180,20 +180,10 @@ with gr.Blocks() as demo:
|
|
180 |
inputs=[image_input, prompt_input, gemini_api_key],
|
181 |
outputs=output_gallery,
|
182 |
)
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
# Call the function directly
|
191 |
-
logger.info("Calling process_image_and_prompt directly...")
|
192 |
-
result = process_image_and_prompt(dummy_image, dummy_prompt, dummy_api_key)
|
193 |
-
|
194 |
-
if result:
|
195 |
-
logger.info(f"Direct call successful. Result: {result}")
|
196 |
-
# result[0].show() # Uncomment to display image if running locally
|
197 |
-
else:
|
198 |
-
logger.error("Direct call failed.")
|
199 |
-
|
|
|
180 |
inputs=[image_input, prompt_input, gemini_api_key],
|
181 |
outputs=output_gallery,
|
182 |
)
|
183 |
+
|
184 |
+
try:
|
185 |
+
demo.launch(share=True)
|
186 |
+
except Exception as e:
|
187 |
+
logger.error(f"Failed to launch Gradio app: {e}")
|
188 |
+
print(f"Failed to launch Gradio app: {e}") #Print for debuging in console.
|
189 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|