Spaces:
Running
on
Zero
Running
on
Zero
xinjie.wang
commited on
Commit
·
36c2c30
1
Parent(s):
9710618
update
Browse files
app.py
CHANGED
@@ -23,7 +23,6 @@ from gradio.themes.utils.colors import slate
|
|
23 |
with gr.Blocks(
|
24 |
delete_cache=(43200, 43200), theme=Default(primary_hue=slate)
|
25 |
) as demo:
|
26 |
-
# inject_image_css()
|
27 |
gr.Markdown(
|
28 |
f"""
|
29 |
## Image to 3D Asset Pipeline \n
|
@@ -42,8 +41,7 @@ with gr.Blocks(
|
|
42 |
format="png",
|
43 |
image_mode="RGBA",
|
44 |
type="pil",
|
45 |
-
|
46 |
-
# elem_classes=["image-container"],
|
47 |
)
|
48 |
gr.Markdown(
|
49 |
"""
|
|
|
23 |
with gr.Blocks(
|
24 |
delete_cache=(43200, 43200), theme=Default(primary_hue=slate)
|
25 |
) as demo:
|
|
|
26 |
gr.Markdown(
|
27 |
f"""
|
28 |
## Image to 3D Asset Pipeline \n
|
|
|
41 |
format="png",
|
42 |
image_mode="RGBA",
|
43 |
type="pil",
|
44 |
+
height=400,
|
|
|
45 |
)
|
46 |
gr.Markdown(
|
47 |
"""
|
common.py
CHANGED
@@ -127,20 +127,6 @@ elif os.getenv("GRADIO_APP") == "texture_edit":
|
|
127 |
os.makedirs(TMP_DIR, exist_ok=True)
|
128 |
|
129 |
|
130 |
-
def inject_image_css():
|
131 |
-
return gr.HTML(
|
132 |
-
"""
|
133 |
-
<style>
|
134 |
-
.image-container img {
|
135 |
-
object-fit: contain !important;
|
136 |
-
max-width: 100% !important;
|
137 |
-
max-height: 100% !important;
|
138 |
-
}
|
139 |
-
</style>
|
140 |
-
"""
|
141 |
-
)
|
142 |
-
|
143 |
-
|
144 |
def start_session(req: gr.Request) -> None:
|
145 |
user_dir = os.path.join(TMP_DIR, str(req.session_hash))
|
146 |
os.makedirs(user_dir, exist_ok=True)
|
|
|
127 |
os.makedirs(TMP_DIR, exist_ok=True)
|
128 |
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
def start_session(req: gr.Request) -> None:
|
131 |
user_dir = os.path.join(TMP_DIR, str(req.session_hash))
|
132 |
os.makedirs(user_dir, exist_ok=True)
|