shahabkahn commited on
Commit
9472a68
·
verified ·
1 Parent(s): 89e1308

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -143,16 +143,16 @@ async def query(question_request: QuestionRequest):
143
  raise HTTPException(status_code=500, detail="Internal Server Error")
144
 
145
 
146
- #def run_streamlit():
147
- #subprocess.Popen(["streamlit", "run", "frontend.py", "--server.port", "8501"])
148
 
149
- #@app.on_event("startup")
150
- #async def startup_event():
151
- #run_streamlit()
152
 
153
  @app.get("/")
154
  async def root():
155
- return RedirectResponse(url="/docs")
156
 
157
 
158
  #if __name__ == '__main__':
 
143
  raise HTTPException(status_code=500, detail="Internal Server Error")
144
 
145
 
146
+ def run_streamlit():
147
+ subprocess.Popen(["streamlit", "run", "frontend.py", "--server.port", "8501"])
148
 
149
+ @app.on_event("startup")
150
+ async def startup_event():
151
+ run_streamlit()
152
 
153
  @app.get("/")
154
  async def root():
155
+ return RedirectResponse(url="http://localhost:8501")
156
 
157
 
158
  #if __name__ == '__main__':