helloway commited on
Commit
73944b7
·
1 Parent(s): d33db86

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -6,7 +6,7 @@ import gradio as gr
6
  from io import BytesIO
7
 
8
 
9
- def gen_image(desc: str):
10
  """generate the image from the wukong huahua model of ascend server in Wuhan AICC
11
  Args:
12
  desc(str): the input description text
@@ -19,8 +19,9 @@ def gen_image(desc: str):
19
  # url = f"https://a2f051d4cabf45f885d7b0108edc9b9c.infer.ovaijisuan.com/v1/infers/dce9ad51-7cde-4eeb-8291-ae29f267ed2c/wukong-hf"
20
  url = f"https://a2f051d4cabf45f885d7b0108edc9b9c.infer.ovaijisuan.com/v1/infers/975eedfd-6e15-4571-8ca9-b945da0da24b/wukong-hf"
21
  body = {
 
22
  "desc": desc,
23
- "style": ""
24
  }
25
 
26
  resp_data = requests.post(url, json=body, headers=headers)
 
6
  from io import BytesIO
7
 
8
 
9
+ def gen_image(desc: str, style: str):
10
  """generate the image from the wukong huahua model of ascend server in Wuhan AICC
11
  Args:
12
  desc(str): the input description text
 
19
  # url = f"https://a2f051d4cabf45f885d7b0108edc9b9c.infer.ovaijisuan.com/v1/infers/dce9ad51-7cde-4eeb-8291-ae29f267ed2c/wukong-hf"
20
  url = f"https://a2f051d4cabf45f885d7b0108edc9b9c.infer.ovaijisuan.com/v1/infers/975eedfd-6e15-4571-8ca9-b945da0da24b/wukong-hf"
21
  body = {
22
+ "user_name": 'huggingface',
23
  "desc": desc,
24
+ "style": style
25
  }
26
 
27
  resp_data = requests.post(url, json=body, headers=headers)