Spaces:
Sleeping
Sleeping
dhanishetty
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,7 @@ import gradio as gr
|
|
6 |
|
7 |
|
8 |
def get_image(prompt,textbox):
|
|
|
9 |
client = OpenAI(api_key=textbox)
|
10 |
response = client.images.generate(
|
11 |
model = "dall-e-3",
|
@@ -28,6 +29,7 @@ gr.Interface(fn=get_image,
|
|
28 |
gr.Textbox(label="Enter your Prompt",),
|
29 |
gr.Textbox(label="Enter your API-Key", placeholder="API-Key", lines=1)
|
30 |
]
|
31 |
-
, outputs= gr.Image(type='pil')
|
|
|
32 |
|
33 |
|
|
|
6 |
|
7 |
|
8 |
def get_image(prompt,textbox):
|
9 |
+
prompt = prompt
|
10 |
client = OpenAI(api_key=textbox)
|
11 |
response = client.images.generate(
|
12 |
model = "dall-e-3",
|
|
|
29 |
gr.Textbox(label="Enter your Prompt",),
|
30 |
gr.Textbox(label="Enter your API-Key", placeholder="API-Key", lines=1)
|
31 |
]
|
32 |
+
, outputs= gr.Image(type='pil')
|
33 |
+
).launch()
|
34 |
|
35 |
|