Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
MarziehFadaee
commited on
Commit
•
7eabdd5
1
Parent(s):
f6db6e1
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def generate_response(user_message, cid, history=None):
|
|
21 |
cid = str(uuid.uuid4())
|
22 |
|
23 |
history.append(user_message)
|
24 |
-
|
25 |
stream = co.chat_stream(message=user_message, conversation_id=cid, model='command-r-plus', connectors=[], temperature=0.3)
|
26 |
|
27 |
output = ""
|
@@ -127,4 +127,7 @@ with gr.Blocks(analytics_enabled=False, css=custom_css) as demo:
|
|
127 |
|
128 |
if __name__ == "__main__":
|
129 |
# demo.launch(debug=True)
|
130 |
-
|
|
|
|
|
|
|
|
21 |
cid = str(uuid.uuid4())
|
22 |
|
23 |
history.append(user_message)
|
24 |
+
|
25 |
stream = co.chat_stream(message=user_message, conversation_id=cid, model='command-r-plus', connectors=[], temperature=0.3)
|
26 |
|
27 |
output = ""
|
|
|
127 |
|
128 |
if __name__ == "__main__":
|
129 |
# demo.launch(debug=True)
|
130 |
+
try:
|
131 |
+
demo.queue(api_open=False, max_size=40).launch(show_api=False)
|
132 |
+
except Exception as e:
|
133 |
+
print(f"Error: {e}")
|