Spaces:
Runtime error
Runtime error
test HF_TOKEN from server
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ if not os.path.exists(save_dir):
|
|
5 |
|
6 |
transcription_model_id = "openai/whisper-large"
|
7 |
llm_model_id = "tiiuae/falcon-7b-instruct"
|
|
|
8 |
|
9 |
from youtube_transcript_api import YouTubeTranscriptApi
|
10 |
import pytube
|
@@ -343,7 +344,7 @@ with gr.Blocks() as demo:
|
|
343 |
with gr.Column(scale=4):
|
344 |
url = gr.Textbox(label="Enter YouTube video URL here:",placeholder="https://www.youtube.com/watch?v=")
|
345 |
with gr.Column(scale=1):
|
346 |
-
api_token = gr.Textbox(label="Paste your Hugging Face API token here:",placeholder=
|
347 |
with gr.Column(scale=1):
|
348 |
sum_btn = gr.Button("Summarize!")
|
349 |
|
|
|
5 |
|
6 |
transcription_model_id = "openai/whisper-large"
|
7 |
llm_model_id = "tiiuae/falcon-7b-instruct"
|
8 |
+
HF_TOKEN = os.environ.get("HF_TOKEN", None)
|
9 |
|
10 |
from youtube_transcript_api import YouTubeTranscriptApi
|
11 |
import pytube
|
|
|
344 |
with gr.Column(scale=4):
|
345 |
url = gr.Textbox(label="Enter YouTube video URL here:",placeholder="https://www.youtube.com/watch?v=")
|
346 |
with gr.Column(scale=1):
|
347 |
+
api_token = gr.Textbox(label="Paste your Hugging Face API token here:",placeholder=HF_TOKEN,visible=False,show_label=True,info='The API token passed via this field is not stored. It is only passed through the Hugging Face Hub API for inference.')
|
348 |
with gr.Column(scale=1):
|
349 |
sum_btn = gr.Button("Summarize!")
|
350 |
|