Commit
·
679953e
1
Parent(s):
be34a60
Simplify: demo at module level for Gradio Spaces
Browse files
app.py
CHANGED
|
@@ -369,14 +369,5 @@ def main():
|
|
| 369 |
if __name__ == "__main__":
|
| 370 |
main()
|
| 371 |
|
| 372 |
-
# For Gradio Spaces -
|
| 373 |
-
|
| 374 |
-
demo = build_interface()
|
| 375 |
-
except Exception as e:
|
| 376 |
-
print(f"Error initializing demo: {e}")
|
| 377 |
-
import traceback
|
| 378 |
-
traceback.print_exc()
|
| 379 |
-
# Fallback minimal demo
|
| 380 |
-
with gr.Blocks() as demo:
|
| 381 |
-
gr.Markdown("# Error")
|
| 382 |
-
gr.Markdown(f"Error: {str(e)}")
|
|
|
|
| 369 |
if __name__ == "__main__":
|
| 370 |
main()
|
| 371 |
|
| 372 |
+
# For Gradio Spaces - demo must be at module level
|
| 373 |
+
demo = build_interface()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|