Spaces:
Runtime error
Runtime error
Update app.py
Browse files52 unmodified lines53545556575859606162636465666768697071727374757677787959608062818283848586878889909192939495719697989952 unmodified lines return decoded_output
# Gradio Interface Setup# def demo():# # Define Gradio input and output components# text_input = gr.Textbox(label="Text Input", placeholder="Enter text here", lines=5)
# # Use type="pil" to work with PIL Image objects# image_input = gr.Image(label="Upload an Image", type="pil")
# output = gr.Textbox(label="Model Output", lines=5)
# # Define the interface layout# interface = gr.Interface(# fn=process_input,# inputs=[text_input, image_input],# outputs=output,# title="Llama 3.2 Multimodal Text-Image Analyzer",# description="Upload an image and/or provide text for analysis using the Llama 3.2 Vision Model."# )
# # Launch the demo# interface.launch()
def demo(): # Define Gradio input and output components text_input = gr.Textbox(label="Text Input", placeholder="Enter text here", lines=5)
# Use type="pil" to work with PIL Image objects image_input = gr.Image(label="Upload an Image", type="pil")
output = gr.Textbox(label="Model Output", lines=5)
# Add two examples for multimodal analysis examples = [ ["The llama is ", "./examples/rococo.jpg"], ["The cute hampster is wearing ", "./examples/weather_events.png"] ]
# Define the interface layout interface = gr.Interface( fn=process_input, inputs=[text_input, image_input], outputs=output, examples=examples, title="Llama 3.2 Multimodal Text-Image Analyzer", description="Upload an image and/or provide text for analysis using the Llama 3.2 Vision Model." description="Upload an image and/or provide text for analysis using the Llama 3.2 Vision Model. You can also try out the provided examples.", )
# Launch the demoapp.py+29-4