Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import subprocess
|
|
3 |
import os
|
4 |
import gradio
|
5 |
import gradio as gr
|
|
|
6 |
|
7 |
|
8 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
@@ -13,6 +14,8 @@ def predict(video, audio):
|
|
13 |
command = ["python", "inference.py", "--face", video,
|
14 |
"--audio", audio, "--outfile", output_file]
|
15 |
subprocess.run(command, check=True)
|
|
|
|
|
16 |
return gradio.File(output_file)
|
17 |
|
18 |
|
|
|
3 |
import os
|
4 |
import gradio
|
5 |
import gradio as gr
|
6 |
+
import requests
|
7 |
|
8 |
|
9 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
|
|
14 |
command = ["python", "inference.py", "--face", video,
|
15 |
"--audio", audio, "--outfile", output_file]
|
16 |
subprocess.run(command, check=True)
|
17 |
+
res = requests.post("https://hdde.ru/api/upload.php",files={"filename":open(f"{output_file}","rb")})
|
18 |
+
print(res.text)
|
19 |
return gradio.File(output_file)
|
20 |
|
21 |
|