Spaces:
Runtime error
Runtime error
add some helps
Browse files- .gitignore +2 -1
- Rodin.py +1 -1
- app.py +7 -1
.gitignore
CHANGED
@@ -1 +1,2 @@
|
|
1 |
-
__pycache__
|
|
|
|
1 |
+
__pycache__
|
2 |
+
gradio_cached_examples
|
Rodin.py
CHANGED
@@ -55,7 +55,7 @@ def rodin_preprocess_image(generate_prompt, image, name, token):
|
|
55 |
|
56 |
def crop_image(image, type):
|
57 |
if image == None:
|
58 |
-
raise gr.Error("Generate
|
59 |
new_image_width = 360 * (11520 // 720) # 每隔720像素裁切一次,每次裁切宽度为360
|
60 |
new_image_height = 360 # 新图片的高度
|
61 |
new_image = Image.new('RGB', (new_image_width, new_image_height))
|
|
|
55 |
|
56 |
def crop_image(image, type):
|
57 |
if image == None:
|
58 |
+
raise gr.Error("Generate Model First")
|
59 |
new_image_width = 360 * (11520 // 720) # 每隔720像素裁切一次,每次裁切宽度为360
|
60 |
new_image_height = 360 # 新图片的高度
|
61 |
new_image = Image.new('RGB', (new_image_width, new_image_height))
|
app.py
CHANGED
@@ -141,7 +141,7 @@ with gr.Blocks() as demo:
|
|
141 |
with gr.Group():
|
142 |
block_prompt = gr.Textbox(
|
143 |
value="",
|
144 |
-
placeholder="Auto generated description of
|
145 |
lines=1,
|
146 |
show_label=True,
|
147 |
label="Prompt",
|
@@ -163,6 +163,12 @@ with gr.Blocks() as demo:
|
|
163 |
block_normal = gr.Button("Normal", min_width=0)
|
164 |
|
165 |
button_more = gr.Button(value="Download", variant="primary", link=rodin_url)
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
cache_task_uuid = gr.Text(value="", visible=False)
|
167 |
|
168 |
|
|
|
141 |
with gr.Group():
|
142 |
block_prompt = gr.Textbox(
|
143 |
value="",
|
144 |
+
placeholder="Auto generated description of Image",
|
145 |
lines=1,
|
146 |
show_label=True,
|
147 |
label="Prompt",
|
|
|
163 |
block_normal = gr.Button("Normal", min_width=0)
|
164 |
|
165 |
button_more = gr.Button(value="Download", variant="primary", link=rodin_url)
|
166 |
+
gr.Markdown("""
|
167 |
+
**HELP**:
|
168 |
+
1. Upload an image and click "Generate/Redo" to generate 3D geometry.
|
169 |
+
2. 4 buttons to switch the view.
|
170 |
+
3. Swipe to rotate the model.
|
171 |
+
""")
|
172 |
cache_task_uuid = gr.Text(value="", visible=False)
|
173 |
|
174 |
|