Spaces:
Sleeping
Sleeping
Tim Seufert commited on
Commit ·
e1c94e5
1
Parent(s): b9b646c
update interface beta test2
Browse files
app.py
CHANGED
|
@@ -25,7 +25,7 @@ def respond(message, chat_history):
|
|
| 25 |
try:
|
| 26 |
# Generate response using Cohere
|
| 27 |
response = co.generate(
|
| 28 |
-
model='command-
|
| 29 |
prompt=f"{prompt} '{message_content}'",
|
| 30 |
max_tokens=100,
|
| 31 |
temperature=0.3,
|
|
@@ -52,15 +52,6 @@ with gr.Blocks() as demo:
|
|
| 52 |
# Set up message submission
|
| 53 |
msg.submit(respond, [msg, chatbot], [msg, chatbot])
|
| 54 |
|
| 55 |
-
# New Chat Interface with history
|
| 56 |
-
chat_interface = gr.ChatInterface(
|
| 57 |
-
respond,
|
| 58 |
-
type="messages",
|
| 59 |
-
flagging_mode="manual",
|
| 60 |
-
flagging_options=["Like", "Spam", "Inappropriate", "Other"],
|
| 61 |
-
save_history=True,
|
| 62 |
-
)
|
| 63 |
-
|
| 64 |
# Launch the demo
|
| 65 |
demo.launch(
|
| 66 |
share=True,
|
|
|
|
| 25 |
try:
|
| 26 |
# Generate response using Cohere
|
| 27 |
response = co.generate(
|
| 28 |
+
model='command-xlarge-nightly', # Ensure the correct model ID is used
|
| 29 |
prompt=f"{prompt} '{message_content}'",
|
| 30 |
max_tokens=100,
|
| 31 |
temperature=0.3,
|
|
|
|
| 52 |
# Set up message submission
|
| 53 |
msg.submit(respond, [msg, chatbot], [msg, chatbot])
|
| 54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
# Launch the demo
|
| 56 |
demo.launch(
|
| 57 |
share=True,
|