Spaces:
Running
Running
Update app.py
Browse files
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
|
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
|
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
|
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
|