Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,7 +13,7 @@ def format_prompt(message, history, context):
|
|
| 13 |
return prompt
|
| 14 |
|
| 15 |
def generate(
|
| 16 |
-
prompt, history, temperature=0.2, max_new_tokens=4096, top_p=0.95, repetition_penalty=1.0,
|
| 17 |
):
|
| 18 |
temperature = float(temperature)
|
| 19 |
if temperature < 1e-2:
|
|
@@ -44,6 +44,7 @@ mychatbot = gr.Chatbot(
|
|
| 44 |
|
| 45 |
demo = gr.ChatInterface(fn=generate,
|
| 46 |
chatbot=mychatbot,
|
|
|
|
| 47 |
title="Mixtral 8x7b Chat",
|
| 48 |
retry_btn=None,
|
| 49 |
undo_btn=None
|
|
@@ -51,3 +52,4 @@ demo = gr.ChatInterface(fn=generate,
|
|
| 51 |
|
| 52 |
demo.queue().launch(show_api=True)
|
| 53 |
|
|
|
|
|
|
| 13 |
return prompt
|
| 14 |
|
| 15 |
def generate(
|
| 16 |
+
prompt, context, history, temperature=0.2, max_new_tokens=4096, top_p=0.95, repetition_penalty=1.0,
|
| 17 |
):
|
| 18 |
temperature = float(temperature)
|
| 19 |
if temperature < 1e-2:
|
|
|
|
| 44 |
|
| 45 |
demo = gr.ChatInterface(fn=generate,
|
| 46 |
chatbot=mychatbot,
|
| 47 |
+
inputs=[gr.Textbox("prompt", placeholder="Escribe aquí tu mensaje"), gr.Textbox("context", label="Contexto", placeholder="Ingresa el contexto")],
|
| 48 |
title="Mixtral 8x7b Chat",
|
| 49 |
retry_btn=None,
|
| 50 |
undo_btn=None
|
|
|
|
| 52 |
|
| 53 |
demo.queue().launch(show_api=True)
|
| 54 |
|
| 55 |
+
|