Spaces:
Runtime error
Runtime error
File size: 849 Bytes
808cb8a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import gradio as gr
from gradio_client import Client, file
def run(image_url):
client = Client("dylanebert/LGM-tiny")
image = file(image_url)
result = client.predict(image, api_name="/predict")
return result
demo = gr.Interface(
fn=run,
title="LGM Tiny API",
description="An API wrapper for [LGM Tiny](https://huggingface.co/spaces/dylanebert/LGM-tiny). Intended as a resource for the [ML for 3D Course](https://huggingface.co/learn/ml-for-3d-course).",
inputs=gr.Textbox(label="Image URL", placeholder="Enter image URL, e.g. https://huggingface.co/datasets/dylanebert/iso3d/resolve/main/jpg@512/a_cat_statue.jpg"),
outputs=gr.Model3D(),
examples=[
"https://huggingface.co/datasets/dylanebert/iso3d/resolve/main/jpg@512/a_cat_statue.jpg"
],
allow_duplication=True,
)
demo.queue().launch()
|