Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -131,6 +131,12 @@ def main():
|
|
| 131 |
|
| 132 |
app.launch(server_port=7861, debug=True)
|
| 133 |
|
|
|
|
|
|
|
|
|
|
| 134 |
if __name__ == "__main__":
|
| 135 |
-
|
|
|
|
|
|
|
|
|
|
| 136 |
|
|
|
|
| 131 |
|
| 132 |
app.launch(server_port=7861, debug=True)
|
| 133 |
|
| 134 |
+
import os
|
| 135 |
+
import gradio as gr
|
| 136 |
+
|
| 137 |
if __name__ == "__main__":
|
| 138 |
+
# Use environment variable or dynamic port assignment
|
| 139 |
+
port = int(os.environ.get("GRADIO_SERVER_PORT", 7861)) # Default to 7861
|
| 140 |
+
app.launch(server_port=port, debug=True)
|
| 141 |
+
|
| 142 |
|