Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -55,14 +55,22 @@ def predict(message, history):
|
|
55 |
partial_message = ""
|
56 |
for new_token in streamer:
|
57 |
partial_message += new_token
|
58 |
-
if '
|
59 |
break
|
60 |
yield partial_message
|
61 |
|
62 |
|
63 |
# Setting up the Gradio chat interface.
|
64 |
gr.ChatInterface(predict,
|
65 |
-
title="Phixtral
|
66 |
-
description="
|
67 |
-
examples=[
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
partial_message = ""
|
56 |
for new_token in streamer:
|
57 |
partial_message += new_token
|
58 |
+
if '<|im_end|>' in partial_message: # Breaking the loop if the stop token is generated.
|
59 |
break
|
60 |
yield partial_message
|
61 |
|
62 |
|
63 |
# Setting up the Gradio chat interface.
|
64 |
gr.ChatInterface(predict,
|
65 |
+
title="🔀 Phixtral 2x2_8 Chatbot",
|
66 |
+
description="\n\nChat with [mlabonne/phixtral-4x2_8](https://huggingface.co/mlabonne/phixtral-4x2_8), the first Mixture of Experts made by merging two fine-tuned [microsoft/phi-2](https://huggingface.co/microsoft/phi-2) models. This small model (4.46B param) is good in various tasks, such as programming, story writing, and more.",
|
67 |
+
examples=[
|
68 |
+
'Can you solve the equation 2x + 3 = 11 for x?',
|
69 |
+
'Write an epic poem about Ancient Rome.',
|
70 |
+
'Who was the first person to walk on the Moon?',
|
71 |
+
'Use a list comprehension to create a list of squares for numbers from 1 to 10.',
|
72 |
+
'Recommend some popular science fiction books.',
|
73 |
+
'Can you write a short story about a time-traveling detective?'
|
74 |
+
],
|
75 |
+
theme=gr.themes.Soft(),
|
76 |
+
).launch()
|