Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import twitter_dl
|
3 |
+
import os
|
4 |
+
def go_fn(inp):
|
5 |
+
inp = inp.split("status/",1)[1]
|
6 |
+
out = os.system(f"twitter-dl --tweet {inp} pv")
|
7 |
+
return out
|
8 |
+
|
9 |
+
with gr.Blocks() as app:
|
10 |
+
inp = gr.Textbox()
|
11 |
+
btn = gr.Button()
|
12 |
+
outp = gr.Video()
|
13 |
+
btn.click(go_fn,inp,outp)
|
14 |
+
app.launch()
|