Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -32,33 +32,12 @@ def predict(message, chatbot, system_prompt="", temperature=0.9, max_new_tokens=
|
|
32 |
)
|
33 |
|
34 |
|
35 |
-
additional_inputs=[
|
36 |
-
gr.Textbox("", label="Optional system prompt"),
|
37 |
-
gr.Slider(
|
38 |
-
label="Temperature",
|
39 |
-
value=0.9,
|
40 |
-
minimum=0.0,
|
41 |
-
maximum=1.0,
|
42 |
-
step=0.05,
|
43 |
-
interactive=True,
|
44 |
-
info="Higher values produce more diverse outputs",
|
45 |
-
),
|
46 |
-
gr.Slider(
|
47 |
-
label="Max new tokens",
|
48 |
-
value=4096,
|
49 |
-
minimum=0,
|
50 |
-
maximum=4096,
|
51 |
-
step=64,
|
52 |
-
interactive=True,
|
53 |
-
info="The maximum numbers of new tokens",
|
54 |
-
)
|
55 |
-
]
|
56 |
|
57 |
|
58 |
|
59 |
# Gradio Demo
|
60 |
with gr.Blocks(theme=gr.themes.Base()) as demo:
|
61 |
|
62 |
-
gr.ChatInterface(predict, title=title, description=description, css=css, examples=examples
|
63 |
|
64 |
demo.queue().launch(debug=True)
|
|
|
32 |
)
|
33 |
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
|
37 |
|
38 |
# Gradio Demo
|
39 |
with gr.Blocks(theme=gr.themes.Base()) as demo:
|
40 |
|
41 |
+
gr.ChatInterface(predict, title=title, description=description, css=css, examples=examples)
|
42 |
|
43 |
demo.queue().launch(debug=True)
|