siriuszeina commited on
Commit
46bc653
1 Parent(s): 6eb5e1e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -19
app.py CHANGED
@@ -2,7 +2,9 @@ import streamlit as st
2
  import shutil
3
  import os
4
  from gradio_client import Client
 
5
 
 
6
  if os.path.exists("./output/") == False:
7
  os.mkdir("./output/")
8
  project_name = str(st.text_input("Project name")).replace(" ", "-")
@@ -14,25 +16,7 @@ character = st.text_input("character")
14
  anime_from = st.text_input("From")
15
  seed = st.slider('seed', 0, 2147483647)
16
  if st.button("Generate!"):
17
- client = Client("cagliostrolab/animagine-xl-3.1")
18
- result = client.predict(
19
- "1girl, kobo kanaeru, hololive", # str in 'Prompt' Textbox component
20
- "nsfw, lowres, (bad), text, error, fewer, extra, missing, worst quality, jpeg artifacts, low quality, watermark, unfinished, displeasing, oldest, early, chromatic aberration, signature, extra digits, artistic error, username, scan, [abstract]", # str in 'Negative Prompt' Textbox component
21
- 0, # float (numeric value between 0 and 2147483647) in 'Seed' Slider component
22
- 768, # float (numeric value between 512 and 2048) in 'Width' Slider component
23
- 1344, # float (numeric value between 512 and 2048) in 'Height' Slider component
24
- 7, # float (numeric value between 1 and 12) in 'Guidance scale' Slider component
25
- 28, # float (numeric value between 1 and 50) in 'Number of inference steps' Slider component
26
- "Euler a", # Literal['DPM++ 2M Karras', 'DPM++ SDE Karras', 'DPM++ 2M SDE Karras', 'Euler', 'Euler a', 'DDIM'] in 'Sampler' Dropdown component
27
- "768 x 1344", # Literal['1024 x 1024', '1152 x 896', '896 x 1152', '1216 x 832', '832 x 1216', '1344 x 768', '768 x 1344', '1536 x 640', '640 x 1536', 'Custom'] in 'Aspect Ratio' Radio component
28
- "(None)", # Literal['(None)', 'Cinematic', 'Photographic', 'Anime', 'Manga', 'Digital Art', 'Pixel art', 'Fantasy art', 'Neonpunk', '3D Model'] in 'Style Preset' Radio component
29
- "Standard v3.1", # Literal['(None)', 'Standard v3.0', 'Standard v3.1', 'Light v3.1', 'Heavy v3.1'] in 'Quality Tags Presets' Dropdown component
30
- False, # bool in 'Use Upscaler' Checkbox component
31
- 0, # float (numeric value between 0 and 1) in 'Strength' Slider component
32
- 1, # float (numeric value between 1 and 1.5) in 'Upscale by' Slider component
33
- True, # bool in 'Add Quality Tags' Checkbox component
34
- api_name="/run"
35
- )
36
  st.write(result)
37
 
38
  output_num = len(os.listdir("./output/"))
 
2
  import shutil
3
  import os
4
  from gradio_client import Client
5
+ prompt_prefix = "loli, night, full body, closed mouth, happy face, walking front, "
6
 
7
+ prompt_suffix = "masterpiece, best quality, very aesthetic, absurdres"
8
  if os.path.exists("./output/") == False:
9
  os.mkdir("./output/")
10
  project_name = str(st.text_input("Project name")).replace(" ", "-")
 
16
  anime_from = st.text_input("From")
17
  seed = st.slider('seed', 0, 2147483647)
18
  if st.button("Generate!"):
19
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  st.write(result)
21
 
22
  output_num = len(os.listdir("./output/"))