Spaces:
yashrma
/
Runtime error

yashrma commited on
Commit
96ce9d1
·
1 Parent(s): 2d0b6b7

remove chatinterface

Browse files
Files changed (2) hide show
  1. app.py +18 -40
  2. 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.ChatInterface(
67
  fn=generate,
68
- additional_inputs=[
69
- gr.Textbox(label="System prompt", lines=6),
70
- gr.Slider(
71
- label="Max new tokens",
72
- minimum=1,
73
- maximum=MAX_MAX_NEW_TOKENS,
74
- step=1,
75
- value=DEFAULT_MAX_NEW_TOKENS,
76
- ),
77
- gr.Slider(
78
- label="Temperature",
79
- minimum=0.1,
80
- maximum=4.0,
81
- step=0.1,
82
- value=0.6,
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
- stop_btn=None,
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==0.10.1
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==4.19.2
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