Spaces:
Sleeping
Sleeping
Update app.py
Browse files- revert original
app.py
CHANGED
|
@@ -66,26 +66,20 @@ model_input = gr.Textbox(
|
|
| 66 |
visible=True
|
| 67 |
)
|
| 68 |
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 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()
|
|
|
|
| 66 |
visible=True
|
| 67 |
)
|
| 68 |
|
| 69 |
+
# Chat interface
|
| 70 |
+
demo = gr.ChatInterface(
|
| 71 |
+
fn=respond,
|
| 72 |
+
title="HF Text Generation Model Tester",
|
| 73 |
+
description="Add token + model name",
|
| 74 |
+
additional_inputs=[
|
| 75 |
+
token_input,
|
| 76 |
+
model_input,
|
| 77 |
+
gr.Textbox(value="You are helpful AI chatbot who reponds like a mideval knight who is extremely polite, noble and funny.", label="System Message"),
|
| 78 |
+
gr.Slider(1, 2048, value=512, label="Max Tokens"),
|
| 79 |
+
gr.Slider(0.1, 4.0, value=0.7, label="Temperature"),
|
| 80 |
+
gr.Slider(0.1, 1.0, value=0.95, label="Top-p"),
|
| 81 |
+
],
|
| 82 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
|
| 84 |
if __name__ == "__main__":
|
| 85 |
demo.launch()
|