Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ DEFAULT_MAX_NEW_TOKENS = 2048
|
|
| 16 |
MAX_INPUT_TOKEN_LENGTH = 4000
|
| 17 |
DEFAULT_CHAR_LENGTH = 1000
|
| 18 |
|
| 19 |
-
EXAMPLES = ["https://www.youtube.com/watch?v=aircAruvnKk&ab_channel=3Blue1Brown",
|
| 20 |
"https://www.youtube.com/watch?v=Ilg3gGewQ5U",
|
| 21 |
"https://www.youtube.com/watch?v=WUvTyaaNkzM"
|
| 22 |
]
|
|
@@ -39,7 +39,7 @@ def youtube_link_dataloader(video_link,max_video_length=1000):
|
|
| 39 |
return document
|
| 40 |
|
| 41 |
|
| 42 |
-
def youtube_chat(
|
| 43 |
|
| 44 |
video_document = youtube_link_dataloader(link=youtube_link,char_length=char_length)
|
| 45 |
print("docuemt:",document)
|
|
@@ -64,8 +64,6 @@ def youtube_chat(temperature=0.1,max_tokens=1096,API_key=None,llm_service='mistr
|
|
| 64 |
iface = gr.Interface(
|
| 65 |
fn = youtube_chat,
|
| 66 |
inputs = [
|
| 67 |
-
gr.Slider(0.01, 0.1, value=0.01, step=0.01 , label="temperature", info="Choose between 0.01 to 0.1"),
|
| 68 |
-
gr.Slider(512,MAX_INPUT_TOKEN_LENGTH,value=1024,step=512,label="max new tokens",info='Max new tokens'),
|
| 69 |
gr.Textbox(label="Add API key", type="password"),
|
| 70 |
gr.Dropdown(['mistralai/Mistral-7B-v0.1','llama3-8b-8192'],label='Large Language Model',info='LLM Service'),
|
| 71 |
gr.Textbox(label='You tube link'),
|
|
|
|
| 16 |
MAX_INPUT_TOKEN_LENGTH = 4000
|
| 17 |
DEFAULT_CHAR_LENGTH = 1000
|
| 18 |
|
| 19 |
+
EXAMPLES = [,"https://www.youtube.com/watch?v=aircAruvnKk&ab_channel=3Blue1Brown",
|
| 20 |
"https://www.youtube.com/watch?v=Ilg3gGewQ5U",
|
| 21 |
"https://www.youtube.com/watch?v=WUvTyaaNkzM"
|
| 22 |
]
|
|
|
|
| 39 |
return document
|
| 40 |
|
| 41 |
|
| 42 |
+
def youtube_chat(API_key=None,llm_service='mistralai/Mistral-7B-v0.1',youtube_link=None,char_length=2000):
|
| 43 |
|
| 44 |
video_document = youtube_link_dataloader(link=youtube_link,char_length=char_length)
|
| 45 |
print("docuemt:",document)
|
|
|
|
| 64 |
iface = gr.Interface(
|
| 65 |
fn = youtube_chat,
|
| 66 |
inputs = [
|
|
|
|
|
|
|
| 67 |
gr.Textbox(label="Add API key", type="password"),
|
| 68 |
gr.Dropdown(['mistralai/Mistral-7B-v0.1','llama3-8b-8192'],label='Large Language Model',info='LLM Service'),
|
| 69 |
gr.Textbox(label='You tube link'),
|