Ruurd commited on
Commit
bba0c8d
·
1 Parent(s): 23cc752

Change model_state to get function instead of calling it

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -144,7 +144,7 @@ def diffusion_chat(question, eot_weight, max_it, sharpness, model):
144
  yield f"<b>Final Output (after {i+1} iterations):</b><br>" + final_output
145
 
146
  # --- Gradio Interface ---
147
- model_state = gr.State(load_model())
148
 
149
  demo = gr.Interface(
150
  fn=diffusion_chat,
 
144
  yield f"<b>Final Output (after {i+1} iterations):</b><br>" + final_output
145
 
146
  # --- Gradio Interface ---
147
+ model_state = gr.State(value=load_model()) # this just stores the object
148
 
149
  demo = gr.Interface(
150
  fn=diffusion_chat,