Spaces:
Runtime error
Runtime error
File size: 679 Bytes
5db4680 0a3b7a0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
import gradio as gr
def process_images(files):
# Instantiate your AI model
ai_model = gr.Interface.load("models/facebook/dino-vitb16")
processed_files = []
for file in files:
# Process the image with your AI model
processed_image = ai_model.predict(file)
processed_files.append(processed_image)
return processed_files
# Define the Gradio interface
iface = gr.Interface(
fn=process_images,
inputs=[
gr.inputs.File(multiple=True, label="Upload Blueprints"),
],
outputs=[
gr.outputs.Image(type="pil", multiple=True, label="Processed Blueprints"),
],
)
# Launch the Gradio interface
iface.launch()
|