0notexist0 commited on
Commit
a19c21d
·
verified ·
1 Parent(s): 8452715

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -0
app.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ # Carichi le API degli altri Space gratuitamente
4
+ model_a = gr.load("spaces/tencent/Hunyuan3D-2.0")
5
+ model_b = gr.load("spaces/TencentARC/InstantMesh")
6
+
7
+ def arena_compare(input_img):
8
+ # Esegue entrambi i modelli
9
+ res_a = model_a(input_img)
10
+ res_b = model_b(input_img)
11
+ return res_a, res_b
12
+
13
+ with gr.Blocks() as demo:
14
+ img_input = gr.Image(type="filepath")
15
+ btn = gr.Button("Genera in Arena")
16
+
17
+ with gr.Row():
18
+ out_a = gr.Model3D(label="Hunyuan 3D")
19
+ out_b = gr.Model3D(label="InstantMesh")
20
+
21
+ btn.click(arena_compare, inputs=img_input, outputs=[out_a, out_b])
22
+
23
+ demo.launch()