Spaces:
Sleeping
Sleeping
Change model_state to get function instead of calling it
Browse files
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,
|