Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ def format_prompt(message, history):
|
|
| 15 |
return prompt
|
| 16 |
|
| 17 |
def generate(
|
| 18 |
-
prompt, history, temperature=0.9, max_new_tokens=
|
| 19 |
):
|
| 20 |
temperature = float(temperature)
|
| 21 |
if temperature < 1e-2:
|
|
@@ -94,7 +94,7 @@ with gr.Blocks(css=css) as ai_chat:
|
|
| 94 |
# gr.HTML("<h3><center>In this AI Chat, you can chat with <a href='https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1'>Mistral-7B-Instruct</a> model. π¬<h3><center>")
|
| 95 |
# gr.HTML("<h3><center>Learn more about the model <a href='https://huggingface.co/docs/transformers/main/model_doc/mistral'>here</a>. π<h3><center>")
|
| 96 |
gr.HTML("<h1><center>AI Conversation<h1><center>")
|
| 97 |
-
gr.HTML("<h3><center>How can I help you? You can converse with meπ¬<h3><center>")
|
| 98 |
gr.HTML("<h3><center>Have a wonderful day! π<h3><center>")
|
| 99 |
gr.ChatInterface(
|
| 100 |
generate,
|
|
|
|
| 15 |
return prompt
|
| 16 |
|
| 17 |
def generate(
|
| 18 |
+
prompt, history, temperature=0.9, max_new_tokens=900, top_p=0.95, repetition_penalty=1.0,
|
| 19 |
):
|
| 20 |
temperature = float(temperature)
|
| 21 |
if temperature < 1e-2:
|
|
|
|
| 94 |
# gr.HTML("<h3><center>In this AI Chat, you can chat with <a href='https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1'>Mistral-7B-Instruct</a> model. π¬<h3><center>")
|
| 95 |
# gr.HTML("<h3><center>Learn more about the model <a href='https://huggingface.co/docs/transformers/main/model_doc/mistral'>here</a>. π<h3><center>")
|
| 96 |
gr.HTML("<h1><center>AI Conversation<h1><center>")
|
| 97 |
+
gr.HTML("<h3><center>How can I help you? You can converse with me and say moreπ¬<h3><center>")
|
| 98 |
gr.HTML("<h3><center>Have a wonderful day! π<h3><center>")
|
| 99 |
gr.ChatInterface(
|
| 100 |
generate,
|