remove chatinterface
Browse files- app.py +18 -40
- requirements.txt +2 -2
app.py
CHANGED
@@ -63,48 +63,26 @@ mms_synthesize = gr.Interface(
|
|
63 |
allow_flagging="never",
|
64 |
)
|
65 |
|
66 |
-
chat_interface = gr.
|
67 |
fn=generate,
|
68 |
-
|
69 |
-
gr.Textbox(label="
|
70 |
-
gr.
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
),
|
84 |
-
gr.Slider(
|
85 |
-
label="Top-p (nucleus sampling)",
|
86 |
-
minimum=0.05,
|
87 |
-
maximum=1.0,
|
88 |
-
step=0.05,
|
89 |
-
value=0.9,
|
90 |
-
),
|
91 |
-
gr.Slider(
|
92 |
-
label="Top-k",
|
93 |
-
minimum=1,
|
94 |
-
maximum=1000,
|
95 |
-
step=1,
|
96 |
-
value=50,
|
97 |
-
),
|
98 |
-
gr.Slider(
|
99 |
-
label="Repetition penalty",
|
100 |
-
minimum=1.0,
|
101 |
-
maximum=2.0,
|
102 |
-
step=0.05,
|
103 |
-
value=1.2,
|
104 |
-
),
|
105 |
],
|
106 |
-
|
107 |
-
|
108 |
)
|
109 |
|
110 |
mms_select_source_iden = gr.Radio(
|
|
|
63 |
allow_flagging="never",
|
64 |
)
|
65 |
|
66 |
+
chat_interface = gr.Interface(
|
67 |
fn=generate,
|
68 |
+
inputs=[
|
69 |
+
gr.Textbox(label="Message", type="text"),
|
70 |
+
gr.Textbox(label="Chat History", type="text"),
|
71 |
+
gr.Textbox(label="System prompt", type="text"),
|
72 |
+
],
|
73 |
+
outputs=gr.Textbox(),
|
74 |
+
live=True,
|
75 |
+
title="Chat Interface",
|
76 |
+
description="Interactive chat interface using Hugging Face Transformers.",
|
77 |
+
examples=[
|
78 |
+
["Hello there! How are you doing?", "Previous response from assistant", "System prompt"],
|
79 |
+
["Can you explain briefly to me what is the Python programming language?", "", ""],
|
80 |
+
["Explain the plot of Cinderella in a sentence.", "", ""],
|
81 |
+
["How many hours does it take a man to eat a Helicopter?", "", ""],
|
82 |
+
["Write a 100-word article on 'Benefits of Open-Source in AI research'", "", ""],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
],
|
84 |
+
interpretation="default",
|
85 |
+
allow_flagging=False,
|
86 |
)
|
87 |
|
88 |
mms_select_source_iden = gr.Radio(
|
requirements.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
pip>=23.2
|
2 |
-
gradio_client
|
3 |
librosa
|
4 |
Cython==0.29.21
|
5 |
phonemizer==2.2.1
|
@@ -11,7 +11,7 @@ Unidecode==1.1.1
|
|
11 |
monotonic-align
|
12 |
accelerate==0.27.2
|
13 |
bitsandbytes==0.42.0
|
14 |
-
gradio
|
15 |
protobuf==3.20.3
|
16 |
scipy==1.11.2
|
17 |
sentencepiece==0.1.99
|
|
|
1 |
pip>=23.2
|
2 |
+
gradio_client
|
3 |
librosa
|
4 |
Cython==0.29.21
|
5 |
phonemizer==2.2.1
|
|
|
11 |
monotonic-align
|
12 |
accelerate==0.27.2
|
13 |
bitsandbytes==0.42.0
|
14 |
+
gradio
|
15 |
protobuf==3.20.3
|
16 |
scipy==1.11.2
|
17 |
sentencepiece==0.1.99
|