wjmcat commited on
Commit
f534897
1 Parent(s): c1c65e4

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -4,6 +4,7 @@ from uuid import uuid4
4
  from PIL import Image
5
  import gradio as gr
6
 
 
7
  def gen_image(prompt: str):
8
  """generate the image from the chinese stable diffusion model of paddlenlp server
9
 
@@ -14,7 +15,8 @@ def gen_image(prompt: str):
14
  return
15
  access_token = os.environ['token']
16
 
17
- url = f"https://aip.baidubce.com/rpc/2.0/nlp-itec/poc/all/stable_diffusion?access_token={access_token}"
 
18
  content = requests.post(url, json={"text": prompt}).content
19
 
20
  cache_dir = 'images'
 
4
  from PIL import Image
5
  import gradio as gr
6
 
7
+
8
  def gen_image(prompt: str):
9
  """generate the image from the chinese stable diffusion model of paddlenlp server
10
 
 
15
  return
16
  access_token = os.environ['token']
17
 
18
+ url = f"https://aip.baidubce.com/rpc/2.0/nlp-itec/poc/chinese_stable_diffusion?access_token={access_token}"
19
+
20
  content = requests.post(url, json={"text": prompt}).content
21
 
22
  cache_dir = 'images'