Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,4 @@
|
|
1 |
-
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
-
|
4 |
"""
|
5 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
6 |
"""
|
@@ -46,7 +44,7 @@ For information on how to customize the ChatInterface, peruse the gradio docs: h
|
|
46 |
demo = gr.ChatInterface(
|
47 |
respond,
|
48 |
additional_inputs=[
|
49 |
-
gr.Textbox(value="
|
50 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
51 |
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
52 |
gr.Slider(
|
@@ -57,8 +55,9 @@ demo = gr.ChatInterface(
|
|
57 |
label="Top-p (nucleus sampling)",
|
58 |
),
|
59 |
],
|
|
|
60 |
)
|
61 |
|
62 |
|
63 |
if __name__ == "__main__":
|
64 |
-
demo.launch(debug=True)
|
|
|
|
|
1 |
from huggingface_hub import InferenceClient
|
|
|
2 |
"""
|
3 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
4 |
"""
|
|
|
44 |
demo = gr.ChatInterface(
|
45 |
respond,
|
46 |
additional_inputs=[
|
47 |
+
gr.Textbox(value="An Expert in Legal advice.", label="System message"),
|
48 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
49 |
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
50 |
gr.Slider(
|
|
|
55 |
label="Top-p (nucleus sampling)",
|
56 |
),
|
57 |
],
|
58 |
+
description="# 📜 Legal RAG Chatbot with Mistral",
|
59 |
)
|
60 |
|
61 |
|
62 |
if __name__ == "__main__":
|
63 |
+
demo.launch(debug=True)
|