Spaces:
Sleeping
Sleeping
httpdaniel commited on
Commit ·
523ebc2
1
Parent(s): 7da1690
Updating proxies
Browse files
app.py
CHANGED
|
@@ -7,6 +7,8 @@ import gradio as gr
|
|
| 7 |
model_name = "mistralai/Mixtral-8x7B-Instruct-v0.1"
|
| 8 |
client = InferenceClient(model=model_name)
|
| 9 |
|
|
|
|
|
|
|
| 10 |
|
| 11 |
def transcribe_video(url):
|
| 12 |
video_id = parse_youtube_url(url)
|
|
@@ -45,10 +47,7 @@ def get_transcript_content(video_id):
|
|
| 45 |
try:
|
| 46 |
transcript = YouTubeTranscriptApi.get_transcript(
|
| 47 |
video_id,
|
| 48 |
-
proxies=
|
| 49 |
-
"http": "http://50.172.75.114:80",
|
| 50 |
-
"https": "https://50.172.75.114:80",
|
| 51 |
-
},
|
| 52 |
)
|
| 53 |
transcript_content = parse_transcript(transcript)
|
| 54 |
return transcript_content
|
|
@@ -85,7 +84,7 @@ with gr.Blocks(theme=gr.themes.Base()) as demo:
|
|
| 85 |
gr.Markdown(
|
| 86 |
"<H3>Provide a link to a YouTube video and get a transcription and summary</H3>"
|
| 87 |
)
|
| 88 |
-
gr.Markdown("<H6>Due to YouTube </H6>")
|
| 89 |
|
| 90 |
with gr.Row():
|
| 91 |
with gr.Column(scale=1):
|
|
|
|
| 7 |
model_name = "mistralai/Mixtral-8x7B-Instruct-v0.1"
|
| 8 |
client = InferenceClient(model=model_name)
|
| 9 |
|
| 10 |
+
proxies = {"http": "socks5h://127.0.0.1:9050", "https": "socks5h://127.0.0.1:9050"}
|
| 11 |
+
|
| 12 |
|
| 13 |
def transcribe_video(url):
|
| 14 |
video_id = parse_youtube_url(url)
|
|
|
|
| 47 |
try:
|
| 48 |
transcript = YouTubeTranscriptApi.get_transcript(
|
| 49 |
video_id,
|
| 50 |
+
proxies=proxies,
|
|
|
|
|
|
|
|
|
|
| 51 |
)
|
| 52 |
transcript_content = parse_transcript(transcript)
|
| 53 |
return transcript_content
|
|
|
|
| 84 |
gr.Markdown(
|
| 85 |
"<H3>Provide a link to a YouTube video and get a transcription and summary</H3>"
|
| 86 |
)
|
| 87 |
+
# gr.Markdown("<H6>Due to YouTube </H6>")
|
| 88 |
|
| 89 |
with gr.Row():
|
| 90 |
with gr.Column(scale=1):
|