Spaces:
Runtime error
Runtime error
make inference via APIs default in prompts
Browse files
app.py
CHANGED
@@ -345,21 +345,21 @@ with gr.Blocks() as demo:
|
|
345 |
with gr.Column(scale=4):
|
346 |
url = gr.Textbox(label="Enter YouTube video URL here:",placeholder="https://www.youtube.com/watch?v=")
|
347 |
with gr.Column(scale=1):
|
348 |
-
api_token = gr.Textbox(label="Paste your Hugging Face API token here:",placeholder="hf_...",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.')
|
349 |
with gr.Column(scale=1):
|
350 |
sum_btn = gr.Button("Summarize!")
|
351 |
|
352 |
with gr.Accordion("Transcription Settings",open=False):
|
353 |
with gr.Row():
|
354 |
force_transcribe = gr.Checkbox(label="Transcribe even if transcription is available.", info='If unchecked, the app attempts to download the transcript from YouTube first. Check this if the transcript does not seem accurate.')
|
355 |
-
use_transcribe_api = gr.Checkbox(label="Transcribe using the HuggingFaceHub API.",visible=False)
|
356 |
|
357 |
with gr.Accordion("Summarization Settings",open=False):
|
358 |
with gr.Row():
|
359 |
-
use_llm_api = gr.Checkbox(label="Summarize using the HuggingFaceHub API.",visible=True)
|
360 |
do_sample = gr.Checkbox(label="Set the Temperature",value=True,visible=True)
|
361 |
-
temperature = gr.Slider(minimum=0,maximum=1,value=0
|
362 |
-
words = gr.Slider(minimum=100,maximum=500,value=
|
363 |
|
364 |
gr.Markdown("# Results")
|
365 |
|
|
|
345 |
with gr.Column(scale=4):
|
346 |
url = gr.Textbox(label="Enter YouTube video URL here:",placeholder="https://www.youtube.com/watch?v=")
|
347 |
with gr.Column(scale=1):
|
348 |
+
api_token = gr.Textbox(label="Paste your Hugging Face API token here (optional):",placeholder="hf_...",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.')
|
349 |
with gr.Column(scale=1):
|
350 |
sum_btn = gr.Button("Summarize!")
|
351 |
|
352 |
with gr.Accordion("Transcription Settings",open=False):
|
353 |
with gr.Row():
|
354 |
force_transcribe = gr.Checkbox(label="Transcribe even if transcription is available.", info='If unchecked, the app attempts to download the transcript from YouTube first. Check this if the transcript does not seem accurate.')
|
355 |
+
use_transcribe_api = gr.Checkbox(label="Transcribe using the HuggingFaceHub API.",value=True,visible=False)
|
356 |
|
357 |
with gr.Accordion("Summarization Settings",open=False):
|
358 |
with gr.Row():
|
359 |
+
use_llm_api = gr.Checkbox(label="Summarize using the HuggingFaceHub API.",value=True,visible=True)
|
360 |
do_sample = gr.Checkbox(label="Set the Temperature",value=True,visible=True)
|
361 |
+
temperature = gr.Slider(minimum=0,maximum=1,value=1.0,label="Generation temperature",visible=True)
|
362 |
+
words = gr.Slider(minimum=100,maximum=500,value=150,label="Length of the summary")
|
363 |
|
364 |
gr.Markdown("# Results")
|
365 |
|