Spaces:
Runtime error
Runtime error
Danil
commited on
Commit
Β·
2e161cb
1
Parent(s):
90ad141
app.py
CHANGED
|
@@ -7,7 +7,11 @@ def start_server():
|
|
| 7 |
os.system("uvicorn server:app --port 8080 --host 0.0.0.0 --workers 2")
|
| 8 |
st.session_state['server_started'] = True
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
st.set_page_config(
|
| 13 |
page_title="Incoder Example",
|
|
|
|
| 7 |
os.system("uvicorn server:app --port 8080 --host 0.0.0.0 --workers 2")
|
| 8 |
st.session_state['server_started'] = True
|
| 9 |
|
| 10 |
+
if 'server_started' not in st.session_state:
|
| 11 |
+
st.session_state['server_started'] = False
|
| 12 |
+
|
| 13 |
+
if not st.session_state['server_started']:
|
| 14 |
+
start_server()
|
| 15 |
|
| 16 |
st.set_page_config(
|
| 17 |
page_title="Incoder Example",
|