imravi commited on
Commit
ac4dd14
·
verified ·
1 Parent(s): 2259de4

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -149,12 +149,12 @@ User query: {query}
149
  yield "I apologize, but I encountered an error while processing your query. Please try again."
150
 
151
  # Initialize chatbot at startup
152
- chatbot = PlantChatbot("/home/avinashhn/bheri_bot/ravi/new/plant_data_chunks_and_embeddings.csv")
153
 
154
  async def response_generator(query: str):
155
  """Wrapper generator for streaming response"""
156
  async for chunk in chatbot.generate_response(query):
157
- yield f"chunk"
158
 
159
  @app.post("/chat")
160
  async def chat(query: Query):
 
149
  yield "I apologize, but I encountered an error while processing your query. Please try again."
150
 
151
  # Initialize chatbot at startup
152
+ chatbot = PlantChatbot("plant_data_chunks_and_embeddings.csv")
153
 
154
  async def response_generator(query: str):
155
  """Wrapper generator for streaming response"""
156
  async for chunk in chatbot.generate_response(query):
157
+ yield f"{chunk}"
158
 
159
  @app.post("/chat")
160
  async def chat(query: Query):