Spaces:
Runtime error
Runtime error
Update
Browse files
app.py
CHANGED
@@ -2,30 +2,24 @@
|
|
2 |
|
3 |
from __future__ import annotations
|
4 |
|
|
|
|
|
5 |
import gradio as gr
|
6 |
|
7 |
from model import Model
|
8 |
|
9 |
-
DESCRIPTION = '''# TEXTure
|
10 |
-
|
11 |
-
This is an unofficial demo for [https://github.com/TEXTurePaper/TEXTurePaper](https://github.com/TEXTurePaper/TEXTurePaper).
|
12 |
|
13 |
-
This demo only accepts as input `.obj` files with less than 100,000 faces.
|
14 |
-
|
15 |
-
Inference takes about 10 minutes on a T4 GPU.
|
16 |
'''
|
|
|
|
|
17 |
|
18 |
model = Model()
|
19 |
|
20 |
with gr.Blocks(css='style.css') as demo:
|
21 |
gr.Markdown(DESCRIPTION)
|
22 |
-
|
23 |
-
gr.HTML("""
|
24 |
-
<p>For faster inference without waiting in queue, you may duplicate the space and upgrade to GPU in settings.
|
25 |
-
<br/>
|
26 |
-
<a href="https://huggingface.co/spaces/TEXTurePaper/TEXTure?duplicate=true">
|
27 |
-
<img style="margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>
|
28 |
-
<p/>""")
|
29 |
with gr.Row():
|
30 |
with gr.Column():
|
31 |
input_shape = gr.Model3D(label='Input 3D mesh')
|
|
|
2 |
|
3 |
from __future__ import annotations
|
4 |
|
5 |
+
import os
|
6 |
+
|
7 |
import gradio as gr
|
8 |
|
9 |
from model import Model
|
10 |
|
11 |
+
DESCRIPTION = '''# [TEXTure](https://github.com/TEXTurePaper/TEXTurePaper)
|
|
|
|
|
12 |
|
13 |
+
- This demo only accepts as input `.obj` files with less than 100,000 faces.
|
14 |
+
- Inference takes about 10 minutes on a T4 GPU.
|
|
|
15 |
'''
|
16 |
+
if (SPACE_ID := os.getenv('SPACE_ID')) is not None:
|
17 |
+
DESCRIPTION += f'\n<p>For faster inference without waiting in queue, you may duplicate the space and upgrade to GPU in settings. <a href="https://huggingface.co/spaces/{SPACE_ID}?duplicate=true"><img style="display: inline; margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space" /></a></p>'
|
18 |
|
19 |
model = Model()
|
20 |
|
21 |
with gr.Blocks(css='style.css') as demo:
|
22 |
gr.Markdown(DESCRIPTION)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
with gr.Row():
|
24 |
with gr.Column():
|
25 |
input_shape = gr.Model3D(label='Input 3D mesh')
|
model.py
CHANGED
@@ -8,7 +8,6 @@ import sys
|
|
8 |
from typing import Generator
|
9 |
|
10 |
import gradio as gr
|
11 |
-
import tqdm
|
12 |
|
13 |
sys.path.append('TEXTurePaper')
|
14 |
|
|
|
8 |
from typing import Generator
|
9 |
|
10 |
import gradio as gr
|
|
|
11 |
|
12 |
sys.path.append('TEXTurePaper')
|
13 |
|