Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -64,22 +64,33 @@ def respond(
|
|
64 |
|
65 |
theme="Nymbo/Nymbo_Theme"
|
66 |
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
if __name__ == "__main__":
|
85 |
-
demo.queue(concurrency_count=20).launch()
|
|
|
64 |
|
65 |
theme="Nymbo/Nymbo_Theme"
|
66 |
|
67 |
+
with gr.Blocks(css=None, theme=theme) as demo:
|
68 |
+
with gr.Tab("Playground"):
|
69 |
+
gr.Markdown("## Playground")
|
70 |
+
with gr.Row():
|
71 |
+
input_text = gr.Textbox(label="Enter your text")
|
72 |
+
submit_button = gr.Button("Submit")
|
73 |
+
output_text = gr.Textbox(label="Processed Text")
|
74 |
+
submit_button.click(
|
75 |
+
fn=respond,
|
76 |
+
inputs=[input_text, output_text],
|
77 |
+
outputs=output_text
|
78 |
+
)
|
79 |
+
additional_inputs = [
|
80 |
+
gr.Textbox(value="๋์ ์ด๋ฆ์ ํ๊ธธ๋์ด๋ค", label="System message"),
|
81 |
+
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
82 |
+
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
83 |
+
gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),
|
84 |
+
]
|
85 |
+
|
86 |
+
with gr.Tab("Guide"):
|
87 |
+
gr.Markdown("## Guide")
|
88 |
+
gr.Markdown("""
|
89 |
+
### How to use:
|
90 |
+
- Use the Playground tab to interact with the chatbot.
|
91 |
+
- Adjust the parameters to see how the model's responses change.
|
92 |
+
- Explore different system messages to guide the conversation.
|
93 |
+
""")
|
94 |
|
95 |
if __name__ == "__main__":
|
96 |
+
demo.queue(concurrency_count=20).launch()
|