Samarth991 commited on
Commit
4a8d123
·
1 Parent(s): a83288e

adding you tube processing LLM

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -55,7 +55,7 @@ def youtube_chat(youtube_link,API_key,llm='HuggingFace',temperature=0.1,max_toke
55
 
56
  document = process_youtube_link(link=youtube_link)
57
  print("Document:",document)
58
-
59
  embedding_model = SentenceTransformerEmbeddings(model_name='thenlper/gte-base',model_kwargs={"device": DEVICE})
60
  texts = process_documents(documents=document)
61
  global vector_db
@@ -113,13 +113,18 @@ css="""
113
 
114
  title ="""<div
115
  style="text-align: center;max-width: 700px;">
116
- <h1>Chat with You Tube videos• OpenAI/HuggingFace</h1>
117
  </div>
118
  """
119
 
120
  with gr.Blocks(css=css) as demo:
121
  with gr.Column(elem_id="col-container"):
122
  gr.HTML(title)
 
 
 
 
 
123
 
124
  with gr.Column():
125
  with gr.Box():
@@ -152,7 +157,7 @@ with gr.Blocks(css=css) as demo:
152
  with gr.Column():
153
  youtube_link = gr.Textbox(label="Add your you tube Link",text_align='left',autofocus=True)
154
  with gr.Box():
155
- with gr.row():
156
  load_youtube_bt = gr.Button("Process Youtube Link",).style(full_width = False)
157
  langchain_status = gr.Textbox(label="Status", placeholder="", interactive = False)
158
 
 
55
 
56
  document = process_youtube_link(link=youtube_link)
57
  print("Document:",document)
58
+
59
  embedding_model = SentenceTransformerEmbeddings(model_name='thenlper/gte-base',model_kwargs={"device": DEVICE})
60
  texts = process_documents(documents=document)
61
  global vector_db
 
113
 
114
  title ="""<div
115
  style="text-align: center;max-width: 700px;">
116
+ <h1>Chat with You Tube videos</h1>
117
  </div>
118
  """
119
 
120
  with gr.Blocks(css=css) as demo:
121
  with gr.Column(elem_id="col-container"):
122
  gr.HTML(title)
123
+ with gr.Accordion("Chat with Falcon-7B-Instruct", open=False):
124
+ with gr.Column():
125
+ gr.Markdown(
126
+ """**Chat over you tube videos with [Falcon-7B-Instruct or ChatGPT]!**
127
+ """)
128
 
129
  with gr.Column():
130
  with gr.Box():
 
157
  with gr.Column():
158
  youtube_link = gr.Textbox(label="Add your you tube Link",text_align='left',autofocus=True)
159
  with gr.Box():
160
+ with gr.Row():
161
  load_youtube_bt = gr.Button("Process Youtube Link",).style(full_width = False)
162
  langchain_status = gr.Textbox(label="Status", placeholder="", interactive = False)
163