Samarth991 commited on
Commit
4a34fa7
·
1 Parent(s): 5073e6b

adding video examples as Radio and linking to fn

Browse files
Files changed (1) hide show
  1. app.py +15 -15
app.py CHANGED
@@ -148,6 +148,21 @@ with gr.Blocks(css=css) as demo:
148
  with gr.Row():
149
  LLM_option = gr.Dropdown(['HuggingFace','OpenAI'],label='Large Language Model Selection')
150
  API_key = gr.Textbox(label="Add API key", type="password",autofocus=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
 
152
  with gr.Group():
153
  chatbot = gr.Chatbot(height=170)
@@ -165,21 +180,6 @@ with gr.Blocks(css=css) as demo:
165
  with gr.Row():
166
  load_youtube_bt = gr.Button("Process Youtube Link",).style(full_width = False)
167
  langchain_status = gr.Textbox(label="Status", placeholder="", interactive = False)
168
-
169
- with gr.Accordion(label='Advanced options', open=False):
170
- max_new_tokens = gr.Slider(
171
- label='Max new tokens',
172
- minimum=2048,
173
- maximum=MAX_NEW_TOKENS,
174
- step=1,
175
- value=DEFAULT_MAX_NEW_TOKENS,
176
- )
177
- temperature = gr.Slider(label='Temperature',minimum=0.1,maximum=4.0,step=0.1,value=DEFAULT_TEMPERATURE,)
178
- char_length = gr.Slider(label='Max Character',
179
- minimum= DEFAULT_CHAR_LENGTH,
180
- maximum = 5*DEFAULT_CHAR_LENGTH,
181
- step = 500,value= 1500
182
- )
183
 
184
  examples_set.change(fn=youtube_chat, inputs=[examples_set,API_key,LLM_option,temperature,max_new_tokens,char_length], outputs=[langchain_status])
185
  youtube_link = examples_set
 
148
  with gr.Row():
149
  LLM_option = gr.Dropdown(['HuggingFace','OpenAI'],label='Large Language Model Selection')
150
  API_key = gr.Textbox(label="Add API key", type="password",autofocus=True)
151
+ with gr.Accordion(label='Advanced options', open=False):
152
+ max_new_tokens = gr.Slider(
153
+ label='Max new tokens',
154
+ minimum=2048,
155
+ maximum=MAX_NEW_TOKENS,
156
+ step=1,
157
+ value=DEFAULT_MAX_NEW_TOKENS,
158
+ )
159
+ temperature = gr.Slider(label='Temperature',minimum=0.1,maximum=4.0,step=0.1,value=DEFAULT_TEMPERATURE,)
160
+ char_length = gr.Slider(label='Max Character',
161
+ minimum= DEFAULT_CHAR_LENGTH,
162
+ maximum = 5*DEFAULT_CHAR_LENGTH,
163
+ step = 500,value= 1500
164
+ )
165
+
166
 
167
  with gr.Group():
168
  chatbot = gr.Chatbot(height=170)
 
180
  with gr.Row():
181
  load_youtube_bt = gr.Button("Process Youtube Link",).style(full_width = False)
182
  langchain_status = gr.Textbox(label="Status", placeholder="", interactive = False)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
 
184
  examples_set.change(fn=youtube_chat, inputs=[examples_set,API_key,LLM_option,temperature,max_new_tokens,char_length], outputs=[langchain_status])
185
  youtube_link = examples_set