Skip to content

Commit

Permalink
todos
Browse files Browse the repository at this point in the history
  • Loading branch information
fatihozturkh2o committed Sep 19, 2024
1 parent 1eba357 commit 44f06c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openai_server/agent_tools/image_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,15 @@ def main():
args = parser.parse_args()

try:
# TODO: Store the model in h2ogpt endpoint? New image_generation parameter for generate.py?
model = TextToImageModel()
image = model.generate(
text=args.prompt,
width=args.width,
height=args.height,
num_inference_steps=args.num_inference_steps
)

# TODO: Parameterize the temp directory
temp_dir = "./openai_files/"
image_path = save_image_to_tempfile(image, temp_dir, args.file)
print(f"Image generated successfully. Saved to {image_path}")
Expand Down

0 comments on commit 44f06c8

Please sign in to comment.