mikaelbhai commited on
Commit
e8f2b4e
·
1 Parent(s): 6336595

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -11
app.py CHANGED
@@ -1,22 +1,21 @@
1
  import os
2
  import gradio as gr
3
  import openai
 
4
  openai.api_key = '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' # your api key
5
  openai.Model.list()
6
 
7
- prompt = "joe mama"
8
  def DALLE(user_input):
9
- messages.append({"role": "user", "content": user_input})
10
  response = prompt
11
 
12
-
13
  DALLE_reply = openai.Image.create(
14
- prompt=prompt
15
- n="2",
16
- size="1024x1024"
17
- )
18
- return ChatGPT_reply
19
-
20
 
21
- iface = gr.Interface(fn=DALLE, inputs = "text", outputs = "image", title = "bhAI")
22
- iface.launch()
 
1
  import os
2
  import gradio as gr
3
  import openai
4
+
5
  openai.api_key = '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' # your api key
6
  openai.Model.list()
7
 
 
8
  def DALLE(user_input):
9
+ prompt = user_input
10
  response = prompt
11
 
 
12
  DALLE_reply = openai.Image.create(
13
+ prompt=prompt,
14
+ n="2",
15
+ size="1024x1024"
16
+ )
17
+
18
+ return DALLE_reply
19
 
20
+ iface = gr.Interface(fn=DALLE, inputs="text", outputs="image", title="bhAI")
21
+ iface.launch()