Spaces:
Sleeping
Sleeping
Update gradio_app.py
Browse files- gradio_app.py +2 -2
gradio_app.py
CHANGED
@@ -3,7 +3,7 @@ import requests
|
|
3 |
|
4 |
def predict(message, history):
|
5 |
# API request to FastAPI backend
|
6 |
-
response = requests.post("http://0.0.0.0:
|
7 |
|
8 |
if response.status_code == 200:
|
9 |
response_data = response.json()
|
@@ -24,4 +24,4 @@ demo = gr.ChatInterface(
|
|
24 |
)
|
25 |
|
26 |
def start_gradio():
|
27 |
-
demo.launch(server_name="0.0.0.0", server_port=
|
|
|
3 |
|
4 |
def predict(message, history):
|
5 |
# API request to FastAPI backend
|
6 |
+
response = requests.post("http://0.0.0.0:8000/chat", json={"message": message, "history": history})
|
7 |
|
8 |
if response.status_code == 200:
|
9 |
response_data = response.json()
|
|
|
24 |
)
|
25 |
|
26 |
def start_gradio():
|
27 |
+
demo.launch(server_name="0.0.0.0", server_port= 7860)
|