Spaces:
Sleeping
Sleeping
File size: 552 Bytes
24488cc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import gradio as gr
import PIL.Image
# Chargez l'image
img = PIL.Image.open('image.jpg')
# Fonction pour générer le contenu
def generate_content(image):
response = model.generate_content(["Write a short, engaging blog post based on this picture. It should include a description of the meal in the photo and talk about my journey meal prepping.", image], stream=True)
print(response.text)
return response.resolve()
# Interface Gradio
iface = gr.Interface(fn=generate_content, inputs=gr.Image(type='pil'), outputs="text")
iface.launch()
|