Spaces:
Sleeping
Sleeping
Commit
·
7b01357
1
Parent(s):
556e7cf
positioning chat and options
Browse files
app.py
CHANGED
@@ -34,7 +34,6 @@ def get_text_from_youtube_link(video_link,max_video_length=800):
|
|
34 |
video_text = ""
|
35 |
video_id = video_link.split("watch?v=")[1].split("&")[0]
|
36 |
srt = YouTubeTranscriptApi.get_transcript(video_id)
|
37 |
-
print("SRT ",srt )
|
38 |
for text_data in srt:
|
39 |
video_text = video_text + " " + text_data.get("text")
|
40 |
if len(video_text) > max_video_length:
|
@@ -182,7 +181,7 @@ with gr.Blocks(css=css) as demo:
|
|
182 |
|
183 |
load_youtube_bt.click(youtube_chat,inputs= [youtube_link,API_key,LLM_option,temperature,max_new_tokens,char_length],outputs=[langchain_status], queue=False)
|
184 |
|
185 |
-
examples_set.change(fn=youtube_chat, inputs=[examples_set,API_key,LLM_option,temperature,max_new_tokens,char_length], outputs=[langchain_status])
|
186 |
clean_chat_btn.click(clear_chat, [], chatbot)
|
187 |
|
188 |
question.submit(add_text, inputs=[chatbot, question], outputs=[chatbot, question]).then(bot, chatbot, chatbot)
|
|
|
34 |
video_text = ""
|
35 |
video_id = video_link.split("watch?v=")[1].split("&")[0]
|
36 |
srt = YouTubeTranscriptApi.get_transcript(video_id)
|
|
|
37 |
for text_data in srt:
|
38 |
video_text = video_text + " " + text_data.get("text")
|
39 |
if len(video_text) > max_video_length:
|
|
|
181 |
|
182 |
load_youtube_bt.click(youtube_chat,inputs= [youtube_link,API_key,LLM_option,temperature,max_new_tokens,char_length],outputs=[langchain_status], queue=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 |
clean_chat_btn.click(clear_chat, [], chatbot)
|
186 |
|
187 |
question.submit(add_text, inputs=[chatbot, question], outputs=[chatbot, question]).then(bot, chatbot, chatbot)
|