GastonMazzei commited on
Commit
a948170
1 Parent(s): 278047c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -135,7 +135,12 @@ def inpaint(prompt, filename, mode):
135
  global COUNTER
136
  COUNTER += 1
137
  print(f'[I]: mode 1')
138
- return f'current counter is: {COUNTER}\nis there a file called {COUNTER-1}.txt? {str(COUNTER-1)+".txt" in os.listdir()}', Oimg
 
 
 
 
 
139
  # End of the little test
140
 
141
  # Set up the images
 
135
  global COUNTER
136
  COUNTER += 1
137
  print(f'[I]: mode 1')
138
+ try:
139
+ with open(f'{filename}.txt','w') as file:
140
+ file.write(prompt)
141
+ return f'Success', Oimg
142
+ except: pass
143
+ return f'Failure to write', Oimg
144
  # End of the little test
145
 
146
  # Set up the images