Spaces:
Runtime error
Runtime error
Update app.py
Browse files52 unmodified lines5354555657585960616263646566676869707172737452 unmodified linesreturn decoded_output# Gradio Interface Setupdef demo():# Define Gradio input and output componentstext_input = gr.Textbox(label="Text Input", placeholder="Enter text here", lines=5)# Use type="pil" to work with PIL Image objectsimage_input = gr.Image(label="Upload an Image", type="pil")output = gr.Textbox(label="Model Output", lines=5)# Define the interface layoutinterface = 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 demo52 unmodified lines535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989952 unmodified linesreturn 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 componentstext_input = gr.Textbox(label="Text Input", placeholder="Enter text here", lines=5)image_input = gr.Image(label="Upload an Image", type="pil")output = gr.Textbox(label="Model Output", lines=5)# Add two examples for multimodal analysisexamples = [["The llama is ", "./examples/rococo.jpg"],["The cute hampster is wearing ", "./examples/weather_events.png"]]# Define the interface layoutinterface = 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. You can also try out the provided examples.",)# Launch the demo
app.py+29-4