Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -50,23 +50,22 @@ def respond(
|
|
| 50 |
"""
|
| 51 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
| 52 |
"""
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
)
|
| 70 |
|
| 71 |
|
| 72 |
if __name__ == "__main__":
|
|
|
|
| 50 |
"""
|
| 51 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
| 52 |
"""
|
| 53 |
+
demo = gr.ChatInterface(
|
| 54 |
+
respond,
|
| 55 |
+
title = "# 🇮🇩 Sahabat AI (Gemma)",
|
| 56 |
+
description = "#### [Model page](https://huggingface.co/GoToCompany/gemma2-9b-cpt-sahabatai-v1-instruct)",
|
| 57 |
+
additional_inputs=[
|
| 58 |
+
gr.Slider(minimum=1, maximum=2048, value=256, step=1, label="Max new tokens"),
|
| 59 |
+
gr.Slider(minimum=0.1, maximum=1.0, value=0.7, step=0.1, label="Temperature"),
|
| 60 |
+
gr.Slider(
|
| 61 |
+
minimum=0.1,
|
| 62 |
+
maximum=1.0,
|
| 63 |
+
value=0.95,
|
| 64 |
+
step=0.05,
|
| 65 |
+
label="Top-p (nucleus sampling)",
|
| 66 |
+
),
|
| 67 |
+
],
|
| 68 |
+
)
|
|
|
|
| 69 |
|
| 70 |
|
| 71 |
if __name__ == "__main__":
|