Spaces:
Running
Running
from flux_kontext_lib import generate_image | |
# Example usage | |
if __name__ == '__main__': | |
try: | |
# Replace with your actual image path | |
image_path = "./image.jpg" | |
prompt = "close his eyes" | |
# Call the library function | |
result = generate_image(prompt, image_path) | |
if result: | |
print("API Response:") | |
print(result) | |
else: | |
print("Request failed. Check error messages for details.") | |
except Exception as e: | |
print(f"Error: {e}") | |