Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
import time
|
3 |
from moviepy.editor import *
|
4 |
from share_btn import community_icon_html, loading_icon_html, share_js
|
5 |
|
|
|
6 |
caption = gr.Blocks.load(name="spaces/SRDdev/Image-Caption")
|
7 |
-
audio_gen = gr.Blocks.load(name="spaces/fffiloni/audioldm-text-to-audio-generation-clone")
|
8 |
|
9 |
def infer(image_input):
|
10 |
cap = caption(image_input, fn_index=0)
|
|
|
1 |
import gradio as gr
|
2 |
+
import os
|
3 |
import time
|
4 |
from moviepy.editor import *
|
5 |
from share_btn import community_icon_html, loading_icon_html, share_js
|
6 |
|
7 |
+
token = os.environ.get('HF_TOKEN')
|
8 |
caption = gr.Blocks.load(name="spaces/SRDdev/Image-Caption")
|
9 |
+
audio_gen = gr.Blocks.load(name="spaces/fffiloni/audioldm-text-to-audio-generation-clone", api_key=token)
|
10 |
|
11 |
def infer(image_input):
|
12 |
cap = caption(image_input, fn_index=0)
|