Spaces:
Runtime error
Runtime error
vericudebuget
commited on
Commit
•
0d80fb4
1
Parent(s):
fb82015
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,13 @@
|
|
1 |
-
from huggingface_hub import InferenceClient
|
2 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
import datetime
|
4 |
|
5 |
# Initialize the InferenceClient
|
@@ -45,16 +53,18 @@ additional_inputs = [
|
|
45 |
gr.Slider(label="Repetition penalty", value=1.2, minimum=1.0, maximum=2.0, step=0.05, interactive=True, info="Penalize repeated tokens")
|
46 |
]
|
47 |
|
48 |
-
gr.
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
)
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
+
from gradio.themes import GoogleFont
|
3 |
+
|
4 |
+
# Define the theme with Montserrat font
|
5 |
+
theme = gr.themes.Default(
|
6 |
+
font=[GoogleFont("Montserrat"), "Arial", "sans-serif"],
|
7 |
+
font_mono=[GoogleFont("Montserrat"), "Courier New", "monospace"]
|
8 |
+
)
|
9 |
+
|
10 |
+
from huggingface_hub import InferenceClient
|
11 |
import datetime
|
12 |
|
13 |
# Initialize the InferenceClient
|
|
|
53 |
gr.Slider(label="Repetition penalty", value=1.2, minimum=1.0, maximum=2.0, step=0.05, interactive=True, info="Penalize repeated tokens")
|
54 |
]
|
55 |
|
56 |
+
with gr.Blocks(theme=theme) as demo:
|
57 |
+
gr.ChatInterface(
|
58 |
+
fn=generate,
|
59 |
+
chatbot=gr.Chatbot(show_label=True, show_share_button=False, show_copy_button=True, likeable=True, layout="panel", fill_height="True", autofocus="True"),
|
60 |
+
additional_inputs=additional_inputs,
|
61 |
+
title="ConvoLite",
|
62 |
+
submit_btn="➢",
|
63 |
+
retry_btn="Retry",
|
64 |
+
undo_btn="↩ Undo",
|
65 |
+
clear_btn="Clear (New chat)",
|
66 |
+
stop_btn="Stop ▢",
|
67 |
+
concurrency_limit=20,
|
68 |
+
)
|
69 |
+
|
70 |
+
demo.launch(show_api=False)
|