Update app.py
Browse files
app.py
CHANGED
|
@@ -10,6 +10,26 @@ def _patched_json_schema_to_python_type(schema, defs=None):
|
|
| 10 |
|
| 11 |
client_utils._json_schema_to_python_type = _patched_json_schema_to_python_type
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
|
| 15 |
import gradio as gr
|
|
@@ -64,7 +84,7 @@ def process_image(image_path):
|
|
| 64 |
title = "3D Visualization of Depth Maps Generated using MiDaS"
|
| 65 |
description = "Improved 3D interactive depth viewer using Three.js"
|
| 66 |
|
| 67 |
-
with gr.Blocks(css=
|
| 68 |
gr.Markdown(f"# {title}")
|
| 69 |
gr.Markdown(description)
|
| 70 |
|
|
|
|
| 10 |
|
| 11 |
client_utils._json_schema_to_python_type = _patched_json_schema_to_python_type
|
| 12 |
|
| 13 |
+
custom_css = """
|
| 14 |
+
.gradio-container {
|
| 15 |
+
max-width: 900px !important;
|
| 16 |
+
margin: auto !important;
|
| 17 |
+
}
|
| 18 |
+
.gr-image {
|
| 19 |
+
max-height: 300px !important;
|
| 20 |
+
}
|
| 21 |
+
.gr-button {
|
| 22 |
+
padding: 8px 16px !important;
|
| 23 |
+
}
|
| 24 |
+
.gr-padded {
|
| 25 |
+
padding: 10px !important;
|
| 26 |
+
}
|
| 27 |
+
h1 {
|
| 28 |
+
font-size: 1.5rem !important;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
#depth-viewer { height: 600px; }
|
| 32 |
+
"""
|
| 33 |
|
| 34 |
|
| 35 |
import gradio as gr
|
|
|
|
| 84 |
title = "3D Visualization of Depth Maps Generated using MiDaS"
|
| 85 |
description = "Improved 3D interactive depth viewer using Three.js"
|
| 86 |
|
| 87 |
+
with gr.Blocks(css=custom_css) as demo:
|
| 88 |
gr.Markdown(f"# {title}")
|
| 89 |
gr.Markdown(description)
|
| 90 |
|