-
Notifications
You must be signed in to change notification settings - Fork 246
/
gradio_app.py
41 lines (32 loc) · 1.09 KB
/
gradio_app.py
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
38
39
40
41
if __name__ == "__main__":
import os
import sys
sys.path.append(os.curdir)
import torch
torch.set_float32_matmul_precision('medium')
torch.backends.cuda.matmul.allow_tf32 = True
torch.set_grad_enabled(False)
import fire
import gradio as gr
from app.gradio_3dgen import create_ui as create_3d_ui
from app.all_models import model_zoo
_TITLE = '''Unique3D: High-Quality and Efficient 3D Mesh Generation from a Single Image'''
_DESCRIPTION = '''
[Project page](https://wukailu.github.io/Unique3D/)
* High-fidelity and diverse textured meshes generated by Unique3D from single-view images.
* The demo is still under construction, and more features are expected to be implemented soon.
'''
def launch():
model_zoo.init_models()
with gr.Blocks(
title=_TITLE,
theme=gr.themes.Monochrome(),
) as demo:
with gr.Row():
with gr.Column(scale=1):
gr.Markdown('# ' + _TITLE)
gr.Markdown(_DESCRIPTION)
create_3d_ui("wkl")
demo.queue().launch(share=True)
if __name__ == '__main__':
fire.Fire(launch)