AMfeta99 commited on
Commit
8349a8f
·
verified ·
1 Parent(s): 9066bb6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -1
app.py CHANGED
@@ -157,9 +157,20 @@ def generate_object_history(object_name):
157
  "future": f"{object_name} - Future"
158
  }
159
 
 
 
 
 
 
 
160
  for time_period, prompt in prompts.items():
161
  print(f"Generating {time_period} frame: {prompt}")
162
- result = agent.run(prompt)
 
 
 
 
 
163
  images.append(result.to_raw())
164
  image_filename = f"{object_name}_{time_period}.png"
165
  plot_and_save_agent_image(result, labels[time_period], save_path=image_filename)
 
157
  "future": f"{object_name} - Future"
158
  }
159
 
160
+
161
+ general_instruction = (
162
+ "Search the necessary information and features for the following prompt, "
163
+ "then generate an image of it."
164
+ )
165
+
166
  for time_period, prompt in prompts.items():
167
  print(f"Generating {time_period} frame: {prompt}")
168
+ #result = agent.run(prompt)
169
+
170
+ result = agent.run(
171
+ general_instruction,
172
+ additional_args={"user_prompt": prompt}
173
+ )
174
  images.append(result.to_raw())
175
  image_filename = f"{object_name}_{time_period}.png"
176
  plot_and_save_agent_image(result, labels[time_period], save_path=image_filename)