Spaces:
Sleeping
Sleeping
Oscar Wang
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,6 @@ import shutil
|
|
| 6 |
from zipfile import ZipFile
|
| 7 |
import logging
|
| 8 |
import json
|
| 9 |
-
import threading
|
| 10 |
import psutil
|
| 11 |
from flask import Flask, request, jsonify
|
| 12 |
|
|
@@ -109,10 +108,8 @@ def gradio_interface():
|
|
| 109 |
theme="light" # Specify a theme that works, "light" is an example
|
| 110 |
)
|
| 111 |
|
| 112 |
-
iface.launch()
|
| 113 |
|
| 114 |
# Launch the Gradio interface using Flask's run method
|
| 115 |
if __name__ == "__main__":
|
| 116 |
-
|
| 117 |
-
# Uncomment the line below if using Flask's run method for local testing
|
| 118 |
-
# app.run(host='0.0.0.0', port=7860)
|
|
|
|
| 6 |
from zipfile import ZipFile
|
| 7 |
import logging
|
| 8 |
import json
|
|
|
|
| 9 |
import psutil
|
| 10 |
from flask import Flask, request, jsonify
|
| 11 |
|
|
|
|
| 108 |
theme="light" # Specify a theme that works, "light" is an example
|
| 109 |
)
|
| 110 |
|
| 111 |
+
iface.launch(port=7860) # Specify the port directly here
|
| 112 |
|
| 113 |
# Launch the Gradio interface using Flask's run method
|
| 114 |
if __name__ == "__main__":
|
| 115 |
+
app.run(host='0.0.0.0', port=7860)
|
|
|
|
|
|