GastonMazzei commited on
Commit
2f4e07c
1 Parent(s): 2b17100

Bugfix: global declaration inside inpaint function

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -118,8 +118,9 @@ def inpaint(prompt, filename, mode):
118
 
119
 
120
  # A little test to see if we can record in memory :-)
121
-
122
  if (int(mode) == 0):
 
123
  content = "Nonexistent file"
124
  try:
125
  with open(f'{filename}.txt','r') as file:
@@ -130,6 +131,7 @@ def inpaint(prompt, filename, mode):
130
  elif (int(mode) == 1):
131
  global COUNTER
132
  COUNTER += 1
 
133
  return f'current counter is: {COUNTER}\nis there a file called {COUNTER-1}.txt? {str(COUNTER-1)+".txt" in os.listdir()}', Oimg
134
  # End of the little test
135
 
 
118
 
119
 
120
  # A little test to see if we can record in memory :-)
121
+ global Oimg, Omask
122
  if (int(mode) == 0):
123
+ print(f'[I]: mode 0')
124
  content = "Nonexistent file"
125
  try:
126
  with open(f'{filename}.txt','r') as file:
 
131
  elif (int(mode) == 1):
132
  global COUNTER
133
  COUNTER += 1
134
+ print(f'[I]: mode 1')
135
  return f'current counter is: {COUNTER}\nis there a file called {COUNTER-1}.txt? {str(COUNTER-1)+".txt" in os.listdir()}', Oimg
136
  # End of the little test
137