Update app.py
Browse files
app.py
CHANGED
|
@@ -20,11 +20,4 @@ with gr.Blocks(theme = theme) as demo:
|
|
| 20 |
hidden_text = gr.Textbox(visible = False) # Added hidden text component
|
| 21 |
gr.ChatInterface(fn=inference, chatbot=chatbot, type="messages", additional_inputs= hidden_text, additional_outputs= hidden_text, save_history= True).render()
|
| 22 |
|
| 23 |
-
|
| 24 |
-
app.add_middleware(
|
| 25 |
-
CORSMiddleware,
|
| 26 |
-
allow_origins=["*"], # or restrict to your site(s)
|
| 27 |
-
allow_methods=["GET", "POST", "OPTIONS"],
|
| 28 |
-
allow_headers=["authorization", "content-type", "accept"],
|
| 29 |
-
allow_credentials=False, # keep False if using "*"
|
| 30 |
-
)
|
|
|
|
| 20 |
hidden_text = gr.Textbox(visible = False) # Added hidden text component
|
| 21 |
gr.ChatInterface(fn=inference, chatbot=chatbot, type="messages", additional_inputs= hidden_text, additional_outputs= hidden_text, save_history= True).render()
|
| 22 |
|
| 23 |
+
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|