Spaces:
Running
Running
Update gradio_app.py
Browse files- gradio_app.py +4 -3
gradio_app.py
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
def infer(text_prompt, action_prompt):
|
4 |
from huggingface_hub import InferenceClient
|
5 |
|
6 |
inf_client = InferenceClient(
|
7 |
-
provider="fal-ai"
|
|
|
8 |
)
|
9 |
|
10 |
# output is a PIL.Image object
|
@@ -59,7 +60,7 @@ with gr.Blocks() as demo:
|
|
59 |
|
60 |
submit_btn.click(
|
61 |
fn = infer,
|
62 |
-
inputs = [text_prompt, action_prompt],
|
63 |
outputs = [image_out, video_out]
|
64 |
)
|
65 |
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
def infer(text_prompt, action_prompt, login):
|
4 |
from huggingface_hub import InferenceClient
|
5 |
|
6 |
inf_client = InferenceClient(
|
7 |
+
provider="fal-ai",
|
8 |
+
api_key=login
|
9 |
)
|
10 |
|
11 |
# output is a PIL.Image object
|
|
|
60 |
|
61 |
submit_btn.click(
|
62 |
fn = infer,
|
63 |
+
inputs = [text_prompt, action_prompt, login],
|
64 |
outputs = [image_out, video_out]
|
65 |
)
|
66 |
|