Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ def format_prompt(message, history):
|
|
16 |
prompt += f"[INST] {message} [/INST]"
|
17 |
return prompt
|
18 |
|
19 |
-
def generate(
|
20 |
temperature = float(temperature)
|
21 |
if temperature < 1e-2:
|
22 |
temperature = 1e-2
|
@@ -92,6 +92,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
92 |
gr.ChatInterface(
|
93 |
generate,
|
94 |
additional_inputs=additional_inputs,
|
|
|
95 |
)
|
96 |
|
97 |
demo.queue().launch(debug=True)
|
|
|
16 |
prompt += f"[INST] {message} [/INST]"
|
17 |
return prompt
|
18 |
|
19 |
+
def generate(prompt, history, temperature=0.9, max_new_tokens=2048, top_p=0.95, repetition_penalty=1.0):
|
20 |
temperature = float(temperature)
|
21 |
if temperature < 1e-2:
|
22 |
temperature = 1e-2
|
|
|
92 |
gr.ChatInterface(
|
93 |
generate,
|
94 |
additional_inputs=additional_inputs,
|
95 |
+
input_component=gr.Textbox(placeholder="Start typing your message..."),
|
96 |
)
|
97 |
|
98 |
demo.queue().launch(debug=True)
|