pvanand commited on
Commit
2fc91ef
1 Parent(s): 54210e7

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +7 -0
main.py CHANGED
@@ -81,6 +81,13 @@ async def coding_assistant(query: QueryModel):
81
  chat_with_llama_stream(messages, model=query.model_id),
82
  media_type="text/event-stream"
83
  )
 
 
 
 
 
 
 
84
  if __name__ == "__main__":
85
  import uvicorn
86
  uvicorn.run(app, host="0.0.0.0", port=7860)
 
81
  chat_with_llama_stream(messages, model=query.model_id),
82
  media_type="text/event-stream"
83
  )
84
+ app.add_middleware(
85
+ CORSMiddleware,
86
+ allow_origins=["*"],
87
+ allow_credentials=True,
88
+ allow_methods=["*"],
89
+ allow_headers=["*"],)
90
+
91
  if __name__ == "__main__":
92
  import uvicorn
93
  uvicorn.run(app, host="0.0.0.0", port=7860)