Commit
·
3cb5f8b
1
Parent(s):
2502582
adding video examples as Radio and linking to fn
Browse files
app.py
CHANGED
@@ -149,18 +149,17 @@ with gr.Blocks(css=css) as demo:
|
|
149 |
|
150 |
with gr.Group():
|
151 |
chatbot = gr.Chatbot(height=250)
|
|
|
152 |
|
153 |
with gr.Row():
|
154 |
question = gr.Textbox(label="Type your question !",lines=1).style(full_width=True)
|
155 |
-
with gr.
|
156 |
submit_btn = gr.Button(value="Send message", variant="primary", scale = 1)
|
157 |
clean_chat_btn = gr.Button("Delete Chat")
|
158 |
|
159 |
with gr.Column():
|
160 |
with gr.Box():
|
161 |
youtube_link = gr.Textbox(label="Add your you tube Link",text_align='left',autofocus=True)
|
162 |
-
examples_set = gr.Radio(label="Examples of some You tube Videos",
|
163 |
-
choices=EXAMPLES)
|
164 |
with gr.Row():
|
165 |
load_youtube_bt = gr.Button("Process Youtube Link",).style(full_width = False)
|
166 |
langchain_status = gr.Textbox(label="Status", placeholder="", interactive = False)
|
@@ -181,6 +180,7 @@ with gr.Blocks(css=css) as demo:
|
|
181 |
)
|
182 |
|
183 |
examples_set.change(fn=youtube_chat, inputs=[examples_set,API_key,LLM_option,temperature,max_new_tokens,char_length], outputs=[langchain_status])
|
|
|
184 |
|
185 |
load_youtube_bt.click(youtube_chat,inputs= [youtube_link,API_key,LLM_option,temperature,max_new_tokens,char_length],outputs=[langchain_status], queue=False)
|
186 |
clean_chat_btn.click(clear_chat, [], chatbot)
|
|
|
149 |
|
150 |
with gr.Group():
|
151 |
chatbot = gr.Chatbot(height=250)
|
152 |
+
examples_set = gr.Radio(label="Examples of some You tube Videos",choices=EXAMPLES)
|
153 |
|
154 |
with gr.Row():
|
155 |
question = gr.Textbox(label="Type your question !",lines=1).style(full_width=True)
|
156 |
+
with gr.Row():
|
157 |
submit_btn = gr.Button(value="Send message", variant="primary", scale = 1)
|
158 |
clean_chat_btn = gr.Button("Delete Chat")
|
159 |
|
160 |
with gr.Column():
|
161 |
with gr.Box():
|
162 |
youtube_link = gr.Textbox(label="Add your you tube Link",text_align='left',autofocus=True)
|
|
|
|
|
163 |
with gr.Row():
|
164 |
load_youtube_bt = gr.Button("Process Youtube Link",).style(full_width = False)
|
165 |
langchain_status = gr.Textbox(label="Status", placeholder="", interactive = False)
|
|
|
180 |
)
|
181 |
|
182 |
examples_set.change(fn=youtube_chat, inputs=[examples_set,API_key,LLM_option,temperature,max_new_tokens,char_length], outputs=[langchain_status])
|
183 |
+
youtube_link = examples_set
|
184 |
|
185 |
load_youtube_bt.click(youtube_chat,inputs= [youtube_link,API_key,LLM_option,temperature,max_new_tokens,char_length],outputs=[langchain_status], queue=False)
|
186 |
clean_chat_btn.click(clear_chat, [], chatbot)
|