Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -86,20 +86,15 @@ def respond(
|
|
86 |
|
87 |
with gr.Blocks(css=css) as demo:
|
88 |
with gr.Column(elem_id="chat-panel"):
|
89 |
-
gr.Markdown("
|
90 |
|
91 |
with gr.Accordion("⚙️ Settings", open=False):
|
92 |
-
system_message = gr.Textbox(
|
93 |
-
value="You are an expert Japanese tutor. Help users understand Japanese grammar, vocabulary, sentence structure, particles, and kanji readings. Reply clearly in English unless the user specifies otherwise.",
|
94 |
-
label="System message"
|
95 |
-
)
|
96 |
max_tokens = gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens")
|
97 |
temperature = gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature")
|
98 |
-
top_p = gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)")
|
99 |
|
100 |
gr.ChatInterface(
|
101 |
respond,
|
102 |
-
additional_inputs=[
|
103 |
)
|
104 |
|
105 |
if __name__ == "__main__":
|
|
|
86 |
|
87 |
with gr.Blocks(css=css) as demo:
|
88 |
with gr.Column(elem_id="chat-panel"):
|
89 |
+
gr.Markdown("French Tutor")
|
90 |
|
91 |
with gr.Accordion("⚙️ Settings", open=False):
|
|
|
|
|
|
|
|
|
92 |
max_tokens = gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens")
|
93 |
temperature = gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature")
|
|
|
94 |
|
95 |
gr.ChatInterface(
|
96 |
respond,
|
97 |
+
additional_inputs=[max_tokens, temperature]
|
98 |
)
|
99 |
|
100 |
if __name__ == "__main__":
|