Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
import requests
|
| 3 |
from PIL import Image
|
| 4 |
import os
|
| 5 |
token = os.environ.get('HF_TOKEN')
|
|
@@ -14,12 +14,12 @@ def infer(audio):
|
|
| 14 |
#image = Image.open(r"wise_woman_portrait.png")
|
| 15 |
portrait_link = talking_face("wise_woman_portrait.png", audio_response, fn_index=0)
|
| 16 |
|
| 17 |
-
portrait_response = requests.get(portrait_link, headers={'Authorization': 'Bearer ' + token})
|
| 18 |
-
print(portrait_response.text)
|
| 19 |
-
return audio_response,
|
| 20 |
|
| 21 |
inputs = gr.Audio(source="microphone",type="filepath")
|
| 22 |
-
outputs = [gr.Audio(), gr.
|
| 23 |
|
| 24 |
demo = gr.Interface(fn=infer, inputs=inputs, outputs=outputs)
|
| 25 |
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
#import requests
|
| 3 |
from PIL import Image
|
| 4 |
import os
|
| 5 |
token = os.environ.get('HF_TOKEN')
|
|
|
|
| 14 |
#image = Image.open(r"wise_woman_portrait.png")
|
| 15 |
portrait_link = talking_face("wise_woman_portrait.png", audio_response, fn_index=0)
|
| 16 |
|
| 17 |
+
#portrait_response = requests.get(portrait_link, headers={'Authorization': 'Bearer ' + token})
|
| 18 |
+
#print(portrait_response.text)
|
| 19 |
+
return audio_response, portrait_link
|
| 20 |
|
| 21 |
inputs = gr.Audio(source="microphone",type="filepath")
|
| 22 |
+
outputs = [gr.Audio(), gr.Video()]
|
| 23 |
|
| 24 |
demo = gr.Interface(fn=infer, inputs=inputs, outputs=outputs)
|
| 25 |
demo.launch()
|