Spaces:
Running
Running
Update gradio_app.py
Browse files- gradio_app.py +4 -3
gradio_app.py
CHANGED
@@ -3,7 +3,8 @@ from huggingface_hub import InferenceClient
|
|
3 |
from gradio_client import Client, handle_file
|
4 |
|
5 |
|
6 |
-
def infer(text_prompt, action_prompt):
|
|
|
7 |
|
8 |
inf_client = InferenceClient(
|
9 |
provider="replicate",
|
@@ -50,7 +51,7 @@ with gr.Blocks() as demo:
|
|
50 |
|
51 |
with gr.Column():
|
52 |
|
53 |
-
gr.LoginButton()
|
54 |
|
55 |
text_prompt = gr.Textbox(label="Icon label")
|
56 |
action_prompt = gr.Textbox(label="Action label")
|
@@ -60,7 +61,7 @@ with gr.Blocks() as demo:
|
|
60 |
|
61 |
submit_btn.click(
|
62 |
fn = infer,
|
63 |
-
inputs = [text_prompt, action_prompt],
|
64 |
outputs = [image_out, video_out]
|
65 |
)
|
66 |
|
|
|
3 |
from gradio_client import Client, handle_file
|
4 |
|
5 |
|
6 |
+
def infer(text_prompt, action_prompt, login):
|
7 |
+
print(login)
|
8 |
|
9 |
inf_client = InferenceClient(
|
10 |
provider="replicate",
|
|
|
51 |
|
52 |
with gr.Column():
|
53 |
|
54 |
+
login = gr.LoginButton()
|
55 |
|
56 |
text_prompt = gr.Textbox(label="Icon label")
|
57 |
action_prompt = gr.Textbox(label="Action label")
|
|
|
61 |
|
62 |
submit_btn.click(
|
63 |
fn = infer,
|
64 |
+
inputs = [text_prompt, action_prompt, login],
|
65 |
outputs = [image_out, video_out]
|
66 |
)
|
67 |
|