Spaces:
Runtime error
Runtime error
Commit
·
ef0202a
1
Parent(s):
bb738df
tweaks
Browse files
app.py
CHANGED
@@ -77,13 +77,17 @@ def handler(text, ts1, ts2, gs1):
|
|
77 |
|
78 |
return pipeline.sample(**args)
|
79 |
|
|
|
|
|
80 |
st.title('nostalgebraist-autoresponder image generation demo')
|
81 |
|
|
|
|
|
82 |
st.header('Prompt')
|
83 |
|
84 |
button_dril = st.button('Fill @dril tweet example text')
|
85 |
|
86 |
-
if button_dril:
|
87 |
st.session_state.fill_value = 'wint\nFollowing\n@dril\nthe wise man bowed his head solemnly and\nspoke: "theres actually zero difference\nbetween good & bad things. you imbecile.\nyou fucking moron'
|
88 |
|
89 |
if 'fill_value' in st.session_state:
|
@@ -97,12 +101,14 @@ text = st.text_area('Enter your text here (or leave blank for a textless image)'
|
|
97 |
|
98 |
st.header('Settings')
|
99 |
|
|
|
|
|
100 |
help_ts1 = "How long to run the base model. Larger values make the image more realistic / better. Smaller values are faster."
|
101 |
help_ts2 = "How long to run the upsampling model. Larger values sometimes make the big image crisper and more detailed. Smaller values are faster."
|
102 |
help_gs1 = "Guidance scale. Larger values make the image more likely to contain the text you wrote. If this is zero, the first part will be faster."
|
103 |
|
104 |
-
ts1 = st.slider('Steps (base)', min_value=5, max_value=500, value=
|
105 |
-
ts2 = st.slider('Steps (upsampling)', min_value=5, max_value=500, value=
|
106 |
gs1 = st.select_slider('Guidance scale (base)', [0.5*i for i in range(9)], value=0., help=help_gs1)
|
107 |
|
108 |
button_go = st.button('Generate')
|
|
|
77 |
|
78 |
return pipeline.sample(**args)
|
79 |
|
80 |
+
FRESH = True
|
81 |
+
|
82 |
st.title('nostalgebraist-autoresponder image generation demo')
|
83 |
|
84 |
+
st.write("Bot: [nostalgebraist-autoresponder](https://nostalgebraist-autoresponder.tumblr.com/)\nAuthor: [nostalgebraist](https://nostalgebraist.tumblr.com/)")
|
85 |
+
|
86 |
st.header('Prompt')
|
87 |
|
88 |
button_dril = st.button('Fill @dril tweet example text')
|
89 |
|
90 |
+
if FRESH and button_dril:
|
91 |
st.session_state.fill_value = 'wint\nFollowing\n@dril\nthe wise man bowed his head solemnly and\nspoke: "theres actually zero difference\nbetween good & bad things. you imbecile.\nyou fucking moron'
|
92 |
|
93 |
if 'fill_value' in st.session_state:
|
|
|
101 |
|
102 |
st.header('Settings')
|
103 |
|
104 |
+
st.write("The bot uses 250 base steps and 250 upsampling steps, with custom spacing (not available here) for the base part.\nSince this demo doesn't have a GPU, you'll probably want to use fewer steps than that unless you have a lot of patience.")
|
105 |
+
|
106 |
help_ts1 = "How long to run the base model. Larger values make the image more realistic / better. Smaller values are faster."
|
107 |
help_ts2 = "How long to run the upsampling model. Larger values sometimes make the big image crisper and more detailed. Smaller values are faster."
|
108 |
help_gs1 = "Guidance scale. Larger values make the image more likely to contain the text you wrote. If this is zero, the first part will be faster."
|
109 |
|
110 |
+
ts1 = st.slider('Steps (base)', min_value=5, max_value=500, value=50, help=help_ts1)
|
111 |
+
ts2 = st.slider('Steps (upsampling)', min_value=5, max_value=500, value=50, help=help_ts2)
|
112 |
gs1 = st.select_slider('Guidance scale (base)', [0.5*i for i in range(9)], value=0., help=help_gs1)
|
113 |
|
114 |
button_go = st.button('Generate')
|