fffiloni commited on
Commit
bf792ee
·
verified ·
1 Parent(s): f1693b2

Update gradio_app.py

Browse files
Files changed (1) hide show
  1. gradio_app.py +4 -4
gradio_app.py CHANGED
@@ -3,8 +3,8 @@ from huggingface_hub import InferenceClient
3
  from gradio_client import Client, handle_file
4
 
5
 
6
- def infer(text_prompt, action_prompt, profile: gr.OAuthProfile):
7
- print(profile)
8
 
9
  inf_client = InferenceClient(
10
  provider="replicate",
@@ -56,12 +56,12 @@ with gr.Blocks() as demo:
56
 
57
  text_prompt = gr.Textbox(label="Icon label")
58
  action_prompt = gr.Textbox(label="Action label")
59
- #submit_btn = gr.Button("Submit")
60
  image_out = gr.Image()
61
  video_out = gr.Video()
62
 
63
 
64
- demo.load(
65
  fn = infer,
66
  inputs = [text_prompt, action_prompt],
67
  outputs = [image_out, video_out]
 
3
  from gradio_client import Client, handle_file
4
 
5
 
6
+ def infer(text_prompt, action_prompt, oauth_token: gr.OAuthToken):
7
+ print(oauth_token.token)
8
 
9
  inf_client = InferenceClient(
10
  provider="replicate",
 
56
 
57
  text_prompt = gr.Textbox(label="Icon label")
58
  action_prompt = gr.Textbox(label="Action label")
59
+ submit_btn = gr.Button("Submit")
60
  image_out = gr.Image()
61
  video_out = gr.Video()
62
 
63
 
64
+ submit_btn.click(
65
  fn = infer,
66
  inputs = [text_prompt, action_prompt],
67
  outputs = [image_out, video_out]