Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -152,17 +152,17 @@ async def query(question_request: QuestionRequest):
|
|
152 |
|
153 |
|
154 |
# Define a function to run the Streamlit app
|
155 |
-
def run_streamlit():
|
156 |
-
subprocess.Popen(["streamlit", "run", "frontend.py"])
|
157 |
|
158 |
-
|
159 |
-
async def serve_streamlit(background_tasks: BackgroundTasks):
|
160 |
# Start the Streamlit app in a background task
|
161 |
-
background_tasks.add_task(run_streamlit)
|
162 |
|
163 |
# Stream the output of the Streamlit app
|
164 |
-
streamlit_output = subprocess.Popen(["streamlit", "run", "frontend.py", "--server.port"], stdout=subprocess.PIPE)
|
165 |
-
return StreamingResponse(streamlit_output.stdout, media_type="text/plain")
|
166 |
|
167 |
|
168 |
#if __name__ == '__main__':
|
|
|
152 |
|
153 |
|
154 |
# Define a function to run the Streamlit app
|
155 |
+
#def run_streamlit():
|
156 |
+
#subprocess.Popen(["streamlit", "run", "frontend.py"])
|
157 |
|
158 |
+
#@app.get("/")
|
159 |
+
#async def serve_streamlit(background_tasks: BackgroundTasks):
|
160 |
# Start the Streamlit app in a background task
|
161 |
+
#background_tasks.add_task(run_streamlit)
|
162 |
|
163 |
# Stream the output of the Streamlit app
|
164 |
+
#streamlit_output = subprocess.Popen(["streamlit", "run", "frontend.py", "--server.port"], stdout=subprocess.PIPE)
|
165 |
+
#return StreamingResponse(streamlit_output.stdout, media_type="text/plain")
|
166 |
|
167 |
|
168 |
#if __name__ == '__main__':
|