Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,7 +17,6 @@ current_img = None
|
|
| 17 |
live_preds = None
|
| 18 |
|
| 19 |
def rotate_btn_fn(img_path, xt, yt, zt, add_bone_cmap=False):
|
| 20 |
-
|
| 21 |
global current_img
|
| 22 |
|
| 23 |
angles = (xt, yt, zt)
|
|
@@ -33,6 +32,7 @@ def rotate_btn_fn(img_path, xt, yt, zt, add_bone_cmap=False):
|
|
| 33 |
|
| 34 |
css_style = "./style.css"
|
| 35 |
callback = gr.CSVLogger()
|
|
|
|
| 36 |
with gr.Blocks(css=css_style, title="RadRotator") as app:
|
| 37 |
gr.HTML("RadRotator: 3D Rotation of Radiographs with Diffusion Models", elem_classes="title")
|
| 38 |
gr.HTML("Developed by:<br>Pouria Rouzrokh, Bardia Khosravi, Shahriar Faghani, Kellen Mulford, Michael J. Taunton, Bradley J. Erickson, Cody C. Wyles<br><a href='https://pouriarouzrokh.github.io/RadRotator'>[Our website]</a>, <a href='https://arxiv.org/abs/2404.13000'>[arXiv Paper]</a>", elem_classes="note")
|
|
@@ -40,7 +40,7 @@ with gr.Blocks(css=css_style, title="RadRotator") as app:
|
|
| 40 |
|
| 41 |
with gr.TabItem("Demo"):
|
| 42 |
with gr.Row():
|
| 43 |
-
input_img = gr.Image(type='filepath', label='Input image',
|
| 44 |
output_img = gr.Image(type='pil', label='Output image', interactive=False, elem_classes='imgs')
|
| 45 |
with gr.Row():
|
| 46 |
with gr.Column(scale=0.25):
|
|
|
|
| 17 |
live_preds = None
|
| 18 |
|
| 19 |
def rotate_btn_fn(img_path, xt, yt, zt, add_bone_cmap=False):
|
|
|
|
| 20 |
global current_img
|
| 21 |
|
| 22 |
angles = (xt, yt, zt)
|
|
|
|
| 32 |
|
| 33 |
css_style = "./style.css"
|
| 34 |
callback = gr.CSVLogger()
|
| 35 |
+
|
| 36 |
with gr.Blocks(css=css_style, title="RadRotator") as app:
|
| 37 |
gr.HTML("RadRotator: 3D Rotation of Radiographs with Diffusion Models", elem_classes="title")
|
| 38 |
gr.HTML("Developed by:<br>Pouria Rouzrokh, Bardia Khosravi, Shahriar Faghani, Kellen Mulford, Michael J. Taunton, Bradley J. Erickson, Cody C. Wyles<br><a href='https://pouriarouzrokh.github.io/RadRotator'>[Our website]</a>, <a href='https://arxiv.org/abs/2404.13000'>[arXiv Paper]</a>", elem_classes="note")
|
|
|
|
| 40 |
|
| 41 |
with gr.TabItem("Demo"):
|
| 42 |
with gr.Row():
|
| 43 |
+
input_img = gr.Image(type='filepath', label='Input image', source='upload', interactive=True, elem_classes='imgs')
|
| 44 |
output_img = gr.Image(type='pil', label='Output image', interactive=False, elem_classes='imgs')
|
| 45 |
with gr.Row():
|
| 46 |
with gr.Column(scale=0.25):
|