Update app.py
Browse files
app.py
CHANGED
|
@@ -135,6 +135,7 @@ def imgTry(funcAny,prompt,filename):
|
|
| 135 |
output=funcAny(prompt)
|
| 136 |
print("prompt "+prompt)
|
| 137 |
saveImg(output,m_pdir+filename)
|
|
|
|
| 138 |
return output
|
| 139 |
except:
|
| 140 |
print("error "+prompt+" ")
|
|
@@ -142,11 +143,13 @@ def imgTry(funcAny,prompt,filename):
|
|
| 142 |
print("------------")
|
| 143 |
return False
|
| 144 |
|
| 145 |
-
global m_num
|
| 146 |
m_num=0
|
|
|
|
| 147 |
def image_mod(image):
|
| 148 |
-
global m_num
|
| 149 |
-
print("image_mod "+str(m_num))
|
|
|
|
| 150 |
while True:
|
| 151 |
m_num += 1
|
| 152 |
ppStr=random.choice(m_ddStr)+random.choice(m_ddStr)+random.choice(m_ddStr)+random.choice(m_ddStr)+random.choice(m_ddStr)+random.choice(m_ddStr)
|
|
|
|
| 135 |
output=funcAny(prompt)
|
| 136 |
print("prompt "+prompt)
|
| 137 |
saveImg(output,m_pdir+filename)
|
| 138 |
+
time.sleep(1)
|
| 139 |
return output
|
| 140 |
except:
|
| 141 |
print("error "+prompt+" ")
|
|
|
|
| 143 |
print("------------")
|
| 144 |
return False
|
| 145 |
|
| 146 |
+
global m_num,m_btime
|
| 147 |
m_num=0
|
| 148 |
+
m_btime=time.time()
|
| 149 |
def image_mod(image):
|
| 150 |
+
global m_num,m_btime
|
| 151 |
+
print("image_mod "+str(m_num)+str(time.time()-m_btime))
|
| 152 |
+
m_btime=time.time()
|
| 153 |
while True:
|
| 154 |
m_num += 1
|
| 155 |
ppStr=random.choice(m_ddStr)+random.choice(m_ddStr)+random.choice(m_ddStr)+random.choice(m_ddStr)+random.choice(m_ddStr)+random.choice(m_ddStr)
|