Samarth991 commited on
Commit
f097af1
·
1 Parent(s): a03e0aa

adding you tube processing LLM

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -1,6 +1,5 @@
1
  import os
2
  import gradio as gr
3
- from text_generation import Client
4
  import logging
5
  from langchain.document_loaders import PDFMinerLoader,CSVLoader ,UnstructuredWordDocumentLoader,TextLoader,OnlinePDFLoader
6
  from langchain.text_splitter import CharacterTextSplitter
@@ -71,13 +70,19 @@ def youtube_chat(youtube_link,API_key,llm='HuggingFace',temperature=0.1,max_toke
71
  )
72
  return "Youtube link Processing completed ..."
73
 
 
 
 
 
 
 
74
  css="""
75
  #col-container {max-width: 700px; margin-left: auto; margin-right: auto;}
76
  """
77
 
78
  title = """
79
  <div style="text-align: center;max-width: 700px;">
80
- <h1>Chat on You Tube video data • OpenAI/HuggingFace</h1>
81
  <p style="text-align: center;">Upload a You tube Link, to create its captions and load them as embeddings <br />
82
  once status is ready, you can start asking questions about the content you uploaded.<br />
83
  The repo provides you an option to use HuggingFace/OpenAI as LLM's, make sure to add your API Key before proceding.
 
1
  import os
2
  import gradio as gr
 
3
  import logging
4
  from langchain.document_loaders import PDFMinerLoader,CSVLoader ,UnstructuredWordDocumentLoader,TextLoader,OnlinePDFLoader
5
  from langchain.text_splitter import CharacterTextSplitter
 
70
  )
71
  return "Youtube link Processing completed ..."
72
 
73
+ ##################################################
74
+ ##################################################
75
+ ################### GRADIO #######################
76
+ ##################################################
77
+ ##################################################
78
+
79
  css="""
80
  #col-container {max-width: 700px; margin-left: auto; margin-right: auto;}
81
  """
82
 
83
  title = """
84
  <div style="text-align: center;max-width: 700px;">
85
+ <h1>Chat with You Tube videos• OpenAI/HuggingFace</h1>
86
  <p style="text-align: center;">Upload a You tube Link, to create its captions and load them as embeddings <br />
87
  once status is ready, you can start asking questions about the content you uploaded.<br />
88
  The repo provides you an option to use HuggingFace/OpenAI as LLM's, make sure to add your API Key before proceding.