Spaces:
Sleeping
Sleeping
update prompt in state if only prompt parameter changed
Browse files
app.py
CHANGED
@@ -113,6 +113,10 @@ def setup_model(loaded_model_setup, prompt, model, seed, num_iterations, enable_
|
|
113 |
if new_args_dict == prev_args_dict:
|
114 |
# If the arguments (excluding prompt) are the same, reuse the loaded setup
|
115 |
print(f"Arguments (excluding prompt) are the same, reusing loaded setup for {model} model.")
|
|
|
|
|
|
|
|
|
116 |
return f"{model} model already loaded with the same configuration.", loaded_model_setup
|
117 |
|
118 |
# If other args differ, proceed with the setup
|
|
|
113 |
if new_args_dict == prev_args_dict:
|
114 |
# If the arguments (excluding prompt) are the same, reuse the loaded setup
|
115 |
print(f"Arguments (excluding prompt) are the same, reusing loaded setup for {model} model.")
|
116 |
+
|
117 |
+
# Update the prompt in the loaded_model_setup
|
118 |
+
loaded_model_setup[0].prompt = prompt
|
119 |
+
|
120 |
return f"{model} model already loaded with the same configuration.", loaded_model_setup
|
121 |
|
122 |
# If other args differ, proceed with the setup
|