alexkueck commited on
Commit
a447bbc
1 Parent(s): 40f9ca5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -137,6 +137,12 @@ def add_file(history, file, prompt):
137
  history = history + [((file.name,), None), (prompt, None)]
138
  return history, prompt, ""
139
 
 
 
 
 
 
 
140
  def transfer_input(inputs):
141
  textbox = reset_textbox()
142
  return (
 
137
  history = history + [((file.name,), None), (prompt, None)]
138
  return history, prompt, ""
139
 
140
+ def create_picture(history, prompt):
141
+ client = OpenAI()
142
+ response = client.images.generate(model="dall-e-3", prompt=prompt,size="1024x1024",quality="standard",n=1,)
143
+ image_url = response.data[0].url
144
+ return image_url
145
+
146
  def transfer_input(inputs):
147
  textbox = reset_textbox()
148
  return (