Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import requests
|
2 |
import re
|
3 |
import json
|
|
|
4 |
|
5 |
def get_response(html_url):
|
6 |
headers = {
|
@@ -38,10 +39,12 @@ def save_audio(title, html_url):
|
|
38 |
|
39 |
|
40 |
with gr.Blocks() as demo:
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
|
|
|
|
45 |
btn.click(save_audio, [inp1, inp2], out1)
|
46 |
demo.launch(debug=True)
|
47 |
|
|
|
1 |
import requests
|
2 |
import re
|
3 |
import json
|
4 |
+
import gradio as gr
|
5 |
|
6 |
def get_response(html_url):
|
7 |
headers = {
|
|
|
39 |
|
40 |
|
41 |
with gr.Blocks() as demo:
|
42 |
+
with gr.Row():
|
43 |
+
with gr.Column():
|
44 |
+
inp1 = gr.Textbox(label="歌曲名", lines=1)
|
45 |
+
inp2 = gr.Textbox(label="B站视频对应的链接", placeholder="https://www.bilibili.com/video/BV1Wj421U7B4/", lines=1)
|
46 |
+
btn = gr.Button("一键下载视频!")
|
47 |
+
out1 = gr.Video(label="为您下载的B站视频")
|
48 |
btn.click(save_audio, [inp1, inp2], out1)
|
49 |
demo.launch(debug=True)
|
50 |
|