Spaces:
Runtime error
Runtime error
Commit
·
b9602b5
1
Parent(s):
491d9dc
state
Browse files
app.py
CHANGED
|
@@ -92,9 +92,13 @@ gs1 = st.select_slider('Guidance scale (base)', [0.5*i for i in range(9)], value
|
|
| 92 |
st.header('Prompt')
|
| 93 |
|
| 94 |
button_dril = st.button('Fill @dril tweet example text')
|
| 95 |
-
|
| 96 |
-
if
|
| 97 |
-
fill_value =
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
|
| 99 |
text = st.text_area('Enter your text here (or leave blank for a textless image)', max_chars=380, height=230,
|
| 100 |
value=fill_value)
|
|
@@ -110,7 +114,9 @@ high_res = st.empty()
|
|
| 110 |
|
| 111 |
if button_go:
|
| 112 |
with generating_marker.container():
|
| 113 |
-
st.write('Generating
|
|
|
|
|
|
|
| 114 |
|
| 115 |
count_low_res, count_high_res = 0, 0
|
| 116 |
times_low, times_high = [], []
|
|
@@ -134,7 +140,7 @@ if button_go:
|
|
| 134 |
total = ts2
|
| 135 |
times_high.append(delta)
|
| 136 |
times = times_high
|
| 137 |
-
prefix = "Part
|
| 138 |
else:
|
| 139 |
target = low_res
|
| 140 |
count_low_res += 1
|
|
@@ -142,7 +148,7 @@ if button_go:
|
|
| 142 |
total = ts1
|
| 143 |
times_low.append(delta)
|
| 144 |
times = times_low
|
| 145 |
-
prefix = "Part
|
| 146 |
|
| 147 |
rate = sum(times)/len(times)
|
| 148 |
|
|
|
|
| 92 |
st.header('Prompt')
|
| 93 |
|
| 94 |
button_dril = st.button('Fill @dril tweet example text')
|
| 95 |
+
|
| 96 |
+
if 'fill_value' in st.session_state:
|
| 97 |
+
fill_value = st.session_state.fill_value
|
| 98 |
+
else:
|
| 99 |
+
fill_value = ""
|
| 100 |
+
if button_dril:
|
| 101 |
+
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'
|
| 102 |
|
| 103 |
text = st.text_area('Enter your text here (or leave blank for a textless image)', max_chars=380, height=230,
|
| 104 |
value=fill_value)
|
|
|
|
| 114 |
|
| 115 |
if button_go:
|
| 116 |
with generating_marker.container():
|
| 117 |
+
st.write('**Generating...**')
|
| 118 |
+
st.write('**Prompt:**')
|
| 119 |
+
st.write(text)
|
| 120 |
|
| 121 |
count_low_res, count_high_res = 0, 0
|
| 122 |
times_low, times_high = [], []
|
|
|
|
| 140 |
total = ts2
|
| 141 |
times_high.append(delta)
|
| 142 |
times = times_high
|
| 143 |
+
prefix = "Part 2 of 2 (upsampling)"
|
| 144 |
else:
|
| 145 |
target = low_res
|
| 146 |
count_low_res += 1
|
|
|
|
| 148 |
total = ts1
|
| 149 |
times_low.append(delta)
|
| 150 |
times = times_low
|
| 151 |
+
prefix = "Part 1 of 2 (base model)"
|
| 152 |
|
| 153 |
rate = sum(times)/len(times)
|
| 154 |
|