alexpantex commited on
Commit
8d8c002
·
verified ·
1 Parent(s): 523d9e6

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -1,4 +1,10 @@
 
1
  import streamlit as st
 
 
 
 
 
2
  import requests
3
 
4
  # Use localhost as FastAPI and Streamlit run in the same environment on Spaces
 
1
+ import threading
2
  import streamlit as st
3
+ from scripts.api import start_api_server
4
+
5
+ # Start the API server in a separate thread
6
+ api_thread = threading.Thread(target=start_api_server)
7
+ api_thread.start()
8
  import requests
9
 
10
  # Use localhost as FastAPI and Streamlit run in the same environment on Spaces