shahabkahn commited on
Commit
7d81152
·
verified ·
1 Parent(s): 6bb2809

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -7
app.py CHANGED
@@ -126,16 +126,10 @@ async def query(question_request: QuestionRequest):
126
  logger.error(f"Error processing query: {e}")
127
  raise HTTPException(status_code=500, detail="Internal Server Error")
128
 
129
- def run_streamlit():
130
- subprocess.Popen(["streamlit", "run", "frontend.py", "--server.port", "8501"])
131
-
132
- @app.on_event("startup")
133
- async def startup_event():
134
- run_streamlit()
135
 
136
  @app.get("/")
137
  async def root():
138
- return RedirectResponse(url="http://localhost:8501")
139
 
140
  #if __name__ == '__main__':
141
  #uvicorn.run(app, host='0.0.0.0', port=7860)
 
126
  logger.error(f"Error processing query: {e}")
127
  raise HTTPException(status_code=500, detail="Internal Server Error")
128
 
 
 
 
 
 
 
129
 
130
  @app.get("/")
131
  async def root():
132
+ return RedirectResponse(url="/docs")
133
 
134
  #if __name__ == '__main__':
135
  #uvicorn.run(app, host='0.0.0.0', port=7860)