Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -66,20 +66,26 @@ model_input = gr.Textbox(
|
|
66 |
visible=True
|
67 |
)
|
68 |
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
if __name__ == "__main__":
|
85 |
demo.launch()
|
|
|
66 |
visible=True
|
67 |
)
|
68 |
|
69 |
+
with gr.Blocks() as demo:
|
70 |
+
# Add the markdown link at the top
|
71 |
+
gr.Markdown("### [View External Counter](https://example.com/counter)")
|
72 |
+
|
73 |
+
[]
|
74 |
+
|
75 |
+
# Define the chat interface
|
76 |
+
chatbot = gr.ChatInterface(
|
77 |
+
fn=respond,
|
78 |
+
title="HF Text Generation Model Tester",
|
79 |
+
description="Add token + model name",
|
80 |
+
additional_inputs=[
|
81 |
+
gr.Textbox(label="Token"),
|
82 |
+
gr.Textbox(label="Model Name"),
|
83 |
+
gr.Textbox(value="You are helpful AI chatbot who responds like a medieval knight who is extremely polite, noble and funny.", label="System Message"),
|
84 |
+
gr.Slider(1, 2048, value=512, label="Max Tokens"),
|
85 |
+
gr.Slider(0.1, 4.0, value=0.7, label="Temperature"),
|
86 |
+
gr.Slider(0.1, 1.0, value=0.95, label="Top-p"),
|
87 |
+
],
|
88 |
+
)
|
89 |
|
90 |
if __name__ == "__main__":
|
91 |
demo.launch()
|