akhaliq HF staff commited on
Commit
1f533df
1 Parent(s): 02e6795

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -10,7 +10,7 @@ def generate_image(api_key, prompt):
10
  api_key = api_key or os.environ.get('TOGETHER_API_KEY')
11
 
12
  if not api_key:
13
- return None, "Please provide a valid Together API key or set the TOGETHER_API_KEY environment variable."
14
 
15
  try:
16
  # Initialize the Together client with the API key
@@ -38,7 +38,7 @@ def generate_image(api_key, prompt):
38
  iface = gr.Interface(
39
  fn=generate_image,
40
  inputs=[
41
- gr.Textbox(type="password", label="Together API Key (optional if set as environment variable)"),
42
  gr.Textbox(lines=3, placeholder="Enter your image prompt here...", label="Prompt")
43
  ],
44
  outputs=[
@@ -46,7 +46,7 @@ iface = gr.Interface(
46
  gr.Textbox(label="Status")
47
  ],
48
  title="Image Generation with FLUX.1.1-pro",
49
- description="Generate images using the FLUX.1.1-pro model via the Together API. You can provide your API key here or set it as the TOGETHER_API_KEY environment variable."
50
  )
51
 
52
  # Launch the interface
 
10
  api_key = api_key or os.environ.get('TOGETHER_API_KEY')
11
 
12
  if not api_key:
13
+ return None, "Please provide a valid Together API key"
14
 
15
  try:
16
  # Initialize the Together client with the API key
 
38
  iface = gr.Interface(
39
  fn=generate_image,
40
  inputs=[
41
+ gr.Textbox(type="password", label="Together API Key"),
42
  gr.Textbox(lines=3, placeholder="Enter your image prompt here...", label="Prompt")
43
  ],
44
  outputs=[
 
46
  gr.Textbox(label="Status")
47
  ],
48
  title="Image Generation with FLUX.1.1-pro",
49
+ description="Generate images using the FLUX.1.1-pro model via the Together API. You can provide your API key here"
50
  )
51
 
52
  # Launch the interface