File size: 1,018 Bytes
62b67d0
d754844
62b67d0
d754844
 
008efbb
d754844
058a3fb
d754844
058a3fb
 
 
d754844
058a3fb
 
 
 
 
 
 
 
d754844
 
 
 
 
 
 
 
008efbb
d754844
 
7b91591
008efbb
62b67d0
a92b6ad
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
29
30
31
32
33
34
35
36
37
import gradio as gr
from gradio_client import Client, file

# def greet(name, intensity):
#     return "Hello, " + name + "!" * int(intensity)

def test(text):
    client = Client("stabilityai/stable-fast-3d")
    result = client.predict(
            image=file('https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png'),
            fr=0.85,
            api_name="/requires_bg_remove"
    )

    # client = Client("stabilityai/TripoSR")
    # result = client.predict(
    #         "https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png",	# filepath  in 'Processed Image' Image component
    #         32,	# float (numeric value between 32 and 320) in 'Marching Cubes Resolution' Slider component
    #         api_name="/generate"
    # )

    return result


# demo = gr.Interface(
#     fn=greet,
#     inputs=["text", "slider"],
#     outputs=["text"],
# )
demo = gr.Interface(
    fn=test,
    inputs=["text"],
    outputs=["text"],
)

demo.launch(share=True)