Upload app.py
Browse files
app.py
CHANGED
|
@@ -43,17 +43,5 @@ def main():
|
|
| 43 |
raise ve
|
| 44 |
|
| 45 |
|
| 46 |
-
if __name__ ==
|
| 47 |
-
|
| 48 |
-
# share=True is useful for Colab or when needing external access.
|
| 49 |
-
# For robust execution, explicitly manage the server if needed.
|
| 50 |
-
# Check if running in a Google Colab environment
|
| 51 |
-
try:
|
| 52 |
-
import google.colab
|
| 53 |
-
IN_COLAB = True
|
| 54 |
-
except:
|
| 55 |
-
IN_COLAB = False
|
| 56 |
-
|
| 57 |
-
demo_instance = create_interface()
|
| 58 |
-
# demo_instance.launch(share=IN_COLAB) # Share only if in Colab, otherwise local
|
| 59 |
-
demo_instance.launch(share=True) # Force share for testing purposes
|
|
|
|
| 43 |
raise ve
|
| 44 |
|
| 45 |
|
| 46 |
+
if __name__ == "__main__":
|
| 47 |
+
main()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|