Spaces:
No application file
No application file
Update app.py
Browse files
app.py
CHANGED
|
@@ -469,6 +469,8 @@ def create_interface():
|
|
| 469 |
|
| 470 |
return iface
|
| 471 |
|
|
|
|
|
|
|
| 472 |
# Main execution
|
| 473 |
if __name__ == "__main__":
|
| 474 |
try:
|
|
@@ -486,15 +488,15 @@ if __name__ == "__main__":
|
|
| 486 |
|
| 487 |
# Create and launch interface
|
| 488 |
iface = create_interface()
|
|
|
|
|
|
|
| 489 |
iface.launch(
|
| 490 |
share=False,
|
| 491 |
server_name="0.0.0.0",
|
| 492 |
server_port=7860,
|
| 493 |
show_error=True,
|
| 494 |
-
show_api=True, #
|
| 495 |
-
|
| 496 |
-
api_open=True, # Make API publicly accessible
|
| 497 |
-
quiet=False # Show startup logs
|
| 498 |
)
|
| 499 |
|
| 500 |
except Exception as e:
|
|
|
|
| 469 |
|
| 470 |
return iface
|
| 471 |
|
| 472 |
+
# Replace the launch section at the end of your app.py file with this:
|
| 473 |
+
|
| 474 |
# Main execution
|
| 475 |
if __name__ == "__main__":
|
| 476 |
try:
|
|
|
|
| 488 |
|
| 489 |
# Create and launch interface
|
| 490 |
iface = create_interface()
|
| 491 |
+
|
| 492 |
+
# Launch with compatible parameters
|
| 493 |
iface.launch(
|
| 494 |
share=False,
|
| 495 |
server_name="0.0.0.0",
|
| 496 |
server_port=7860,
|
| 497 |
show_error=True,
|
| 498 |
+
show_api=True, # This enables API documentation
|
| 499 |
+
quiet=False # Show startup logs
|
|
|
|
|
|
|
| 500 |
)
|
| 501 |
|
| 502 |
except Exception as e:
|