Spaces:
Running
Running
admin
commited on
Commit
·
2e5bead
1
Parent(s):
84abee7
try mp4
Browse files
app.py
CHANGED
@@ -25,11 +25,7 @@ def infer(video_url):
|
|
25 |
return video, parse_time, desc, avatar, author, sign
|
26 |
|
27 |
try:
|
28 |
-
response = requests.get(
|
29 |
-
os.getenv("api"),
|
30 |
-
params={"url": video_url},
|
31 |
-
)
|
32 |
-
|
33 |
response_json = response.json()
|
34 |
retcode = response_json["code"]
|
35 |
if retcode == 200:
|
@@ -62,10 +58,10 @@ if __name__ == "__main__":
|
|
62 |
),
|
63 |
],
|
64 |
outputs=[
|
65 |
-
gr.Video(label="Video download", show_download_button=True),
|
66 |
gr.Textbox(label="Parsing time", show_copy_button=True),
|
67 |
gr.Textbox(label="Video description", show_copy_button=True),
|
68 |
-
gr.Image(label="Author avatar", show_share_button=
|
69 |
gr.Textbox(label="Author nickname", show_copy_button=True),
|
70 |
gr.TextArea(label="Author signature", show_copy_button=True),
|
71 |
],
|
|
|
25 |
return video, parse_time, desc, avatar, author, sign
|
26 |
|
27 |
try:
|
28 |
+
response = requests.get(os.getenv("api"), params={"url": video_url})
|
|
|
|
|
|
|
|
|
29 |
response_json = response.json()
|
30 |
retcode = response_json["code"]
|
31 |
if retcode == 200:
|
|
|
58 |
),
|
59 |
],
|
60 |
outputs=[
|
61 |
+
gr.Video(label="Video download", format="mp4", show_download_button=True),
|
62 |
gr.Textbox(label="Parsing time", show_copy_button=True),
|
63 |
gr.Textbox(label="Video description", show_copy_button=True),
|
64 |
+
gr.Image(label="Author avatar", show_share_button=False),
|
65 |
gr.Textbox(label="Author nickname", show_copy_button=True),
|
66 |
gr.TextArea(label="Author signature", show_copy_button=True),
|
67 |
],
|