Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1128,18 +1128,28 @@ if __name__ == "__main__":
|
|
| 1128 |
os.makedirs("./outputs", exist_ok=True)
|
| 1129 |
|
| 1130 |
with gr.Blocks(title="Paper-Based DXF Generator", theme=gr.themes.Soft()) as demo:
|
| 1131 |
-
|
| 1132 |
-
|
| 1133 |
-
|
| 1134 |
-
|
| 1135 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1136 |
|
| 1137 |
-
**Instructions:**
|
| 1138 |
-
1. Place a single object on paper
|
| 1139 |
-
2. Select the correct paper size
|
| 1140 |
-
3. Configure options as needed
|
| 1141 |
-
4. Click Submit to generate DXF
|
| 1142 |
-
""")
|
| 1143 |
|
| 1144 |
with gr.Row():
|
| 1145 |
with gr.Column():
|
|
@@ -1230,14 +1240,6 @@ if __name__ == "__main__":
|
|
| 1230 |
outputs=[dxf_file, output_image, outlines_image, mask_image, scale_info]
|
| 1231 |
)
|
| 1232 |
|
| 1233 |
-
|
| 1234 |
-
with gr.Row():
|
| 1235 |
-
gr.Markdown("""
|
| 1236 |
-
### Tips for Best Results:
|
| 1237 |
-
- Ensure good lighting and clear paper edges
|
| 1238 |
-
- Place object completely on the paper
|
| 1239 |
-
- Avoid shadows that might interfere with detection
|
| 1240 |
-
- Use high contrast between object and paper
|
| 1241 |
-
""")
|
| 1242 |
|
| 1243 |
demo.launch(share=True)
|
|
|
|
| 1128 |
os.makedirs("./outputs", exist_ok=True)
|
| 1129 |
|
| 1130 |
with gr.Blocks(title="Paper-Based DXF Generator", theme=gr.themes.Soft()) as demo:
|
| 1131 |
+
# Example gallery
|
| 1132 |
+
with gr.Row():
|
| 1133 |
+
gr.Markdown("""
|
| 1134 |
+
# Paper-Based DXF Generator
|
| 1135 |
+
|
| 1136 |
+
Upload an image with a single object placed on paper (A4, A3, or US Letter).
|
| 1137 |
+
The paper serves as a size reference for accurate DXF generation.
|
| 1138 |
+
|
| 1139 |
+
**Instructions:**
|
| 1140 |
+
1. Place a single object on paper
|
| 1141 |
+
2. Select the correct paper size
|
| 1142 |
+
3. Configure options as needed
|
| 1143 |
+
4. Click Submit to generate DXF
|
| 1144 |
+
""")
|
| 1145 |
+
gr.Markdown("""
|
| 1146 |
+
### Tips for Best Results:
|
| 1147 |
+
- Ensure good lighting and clear paper edges
|
| 1148 |
+
- Place object completely at the center of the paper
|
| 1149 |
+
- Avoid shadows that might interfere with detection
|
| 1150 |
+
- Use high contrast between object and paper
|
| 1151 |
+
""")
|
| 1152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1153 |
|
| 1154 |
with gr.Row():
|
| 1155 |
with gr.Column():
|
|
|
|
| 1240 |
outputs=[dxf_file, output_image, outlines_image, mask_image, scale_info]
|
| 1241 |
)
|
| 1242 |
|
| 1243 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1244 |
|
| 1245 |
demo.launch(share=True)
|