Spaces:
Running
Running
gulixin0922
commited on
Commit
•
be2ccdc
1
Parent(s):
94c0081
Update app.py
Browse files
app.py
CHANGED
@@ -255,7 +255,6 @@ def http_bot(
|
|
255 |
api_token = os.environ.get("API_TOKEN", "")
|
256 |
headers = {"Authorization": f"{api_token}", "Content-Type": "application/json"}
|
257 |
|
258 |
-
state.append_message(Conversation.ASSISTANT, state.streaming_placeholder)
|
259 |
# No available worker
|
260 |
if worker_addr == "":
|
261 |
# state.messages[-1][-1] = server_error_msg
|
@@ -286,6 +285,7 @@ def http_bot(
|
|
286 |
"stream": True
|
287 |
}
|
288 |
logger.info(f"==== request ====\n{pload}")
|
|
|
289 |
yield (
|
290 |
state,
|
291 |
state.to_gradio_chatbot(),
|
|
|
255 |
api_token = os.environ.get("API_TOKEN", "")
|
256 |
headers = {"Authorization": f"{api_token}", "Content-Type": "application/json"}
|
257 |
|
|
|
258 |
# No available worker
|
259 |
if worker_addr == "":
|
260 |
# state.messages[-1][-1] = server_error_msg
|
|
|
285 |
"stream": True
|
286 |
}
|
287 |
logger.info(f"==== request ====\n{pload}")
|
288 |
+
state.append_message(Conversation.ASSISTANT, state.streaming_placeholder)
|
289 |
yield (
|
290 |
state,
|
291 |
state.to_gradio_chatbot(),
|