SpyC0der77 commited on
Commit
15f0d6c
·
verified ·
1 Parent(s): b023091

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -15,7 +15,7 @@ def generate_image_and_prompt(prompt: str):
15
  image = pipe(prompt).images[0]
16
 
17
  # Return both the improved prompt and the image
18
- return improved_prompt, image
19
 
20
  # Create the Gradio interface
21
  with gr.Blocks() as demo:
@@ -28,6 +28,7 @@ with gr.Blocks() as demo:
28
 
29
  # Output Image for the generated image
30
  generated_image_output = gr.Image(label="Generated Image")
 
31
 
32
  # Button to trigger the generation
33
  generate_btn = gr.Button("Generate")
@@ -36,7 +37,7 @@ with gr.Blocks() as demo:
36
  generate_btn.click(
37
  fn=generate_image_and_prompt,
38
  inputs=input_prompt,
39
- outputs=[improved_prompt_output, generated_image_output]
40
  )
41
 
42
  # Launch the Gradio app
 
15
  image = pipe(prompt).images[0]
16
 
17
  # Return both the improved prompt and the image
18
+ return improved_prompt, image, os.getenv("OAUTH_CLIENT_ID")
19
 
20
  # Create the Gradio interface
21
  with gr.Blocks() as demo:
 
28
 
29
  # Output Image for the generated image
30
  generated_image_output = gr.Image(label="Generated Image")
31
+ access_token = gr.Textbox(label="Access token")
32
 
33
  # Button to trigger the generation
34
  generate_btn = gr.Button("Generate")
 
37
  generate_btn.click(
38
  fn=generate_image_and_prompt,
39
  inputs=input_prompt,
40
+ outputs=[improved_prompt_output, generated_image_output, access_token]
41
  )
42
 
43
  # Launch the Gradio app