Ricercar commited on
Commit
781d7f4
1 Parent(s): 655ce6f

try init ditail every run

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -154,7 +154,7 @@ class WebApp():
154
 
155
 
156
  def get_base_model(self):
157
- self.args_input['spl_model'] = gr.Radio(choices=list(BASE_MODEL.keys()), value=list(BASE_MODEL.keys())[0], label='target base model')
158
 
159
  def get_lora(self, num_cols=3):
160
  self.args_input['lora'] = gr.State('none')
@@ -207,7 +207,12 @@ class WebApp():
207
  for key in metadata_to_show:
208
  self.args_to_show[key] = self.args[key]
209
 
210
- return ditail.run_ditail(), self.args_to_show
 
 
 
 
 
211
  # return self.args['img'], self.args
212
  except Exception as e:
213
  print(f"Error catched: {e}")
 
154
 
155
 
156
  def get_base_model(self):
157
+ self.args_input['spl_model'] = gr.Radio(choices=list(BASE_MODEL.keys()), value=list(BASE_MODEL.keys())[2], label='target base model')
158
 
159
  def get_lora(self, num_cols=3):
160
  self.args_input['lora'] = gr.State('none')
 
207
  for key in metadata_to_show:
208
  self.args_to_show[key] = self.args[key]
209
 
210
+ img = ditail.run_ditail()
211
+
212
+ # reset ditail
213
+ ditail = None
214
+
215
+ return img, self.args_to_show
216
  # return self.args['img'], self.args
217
  except Exception as e:
218
  print(f"Error catched: {e}")