Merge branch 'main' of https://huggingface.co/spaces/Teapack1/ASR-w-ZeroShotClassification-Assistant
Browse files
app.py
CHANGED
|
@@ -13,6 +13,8 @@ subprocess.run("uvicorn server:app --host 0.0.0.0 --port 7860", shell=True)
|
|
| 13 |
def start_server():
|
| 14 |
os.system("uvicorn server:app --port 8080 --workers 2")
|
| 15 |
|
|
|
|
|
|
|
| 16 |
def is_port_in_use(port):
|
| 17 |
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
| 18 |
return s.connect_ex(('0.0.0.0', port)) == 0
|
|
@@ -23,6 +25,7 @@ def main():
|
|
| 23 |
else:
|
| 24 |
start_server()
|
| 25 |
|
| 26 |
-
|
|
|
|
| 27 |
main()
|
| 28 |
"""
|
|
|
|
| 13 |
def start_server():
|
| 14 |
os.system("uvicorn server:app --port 8080 --workers 2")
|
| 15 |
|
| 16 |
+
os.system("uvicorn server:app --port 8080 --workers 2")
|
| 17 |
+
|
| 18 |
def is_port_in_use(port):
|
| 19 |
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
| 20 |
return s.connect_ex(('0.0.0.0', port)) == 0
|
|
|
|
| 25 |
else:
|
| 26 |
start_server()
|
| 27 |
|
| 28 |
+
main()
|
| 29 |
+
"""
|
| 30 |
main()
|
| 31 |
"""
|