Skip to content

Commit 09ffdf4

Browse files
committed
Added new models, returned gr.Sidebar with the default closed option
1 parent 6f69574 commit 09ffdf4

File tree

6 files changed

+16
-21
lines changed

6 files changed

+16
-21
lines changed

particleanalyzer/core/Detectron2Loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Detectron2Loader:
1818
MODEL_MAPPING = {
1919
"Mask R-CNN X152 (dataset 9)": {
2020
"config_file": "Misc/cascade_mask_rcnn_X_152_32x8d_FPN_IN5k_gn_dconv.yaml",
21-
"weights_file": "cascade_mask_rcnn_X_152_32x8d_FPN_IN5k_gn_dconv_d9.pth",
21+
"weights_file": "cascade_mask_rcnn_X_152_32x8d_FPN_IN5k_gn_dconv_d10.pth",
2222
"config_path": "cascade_mask_rcnn_X_152_32x8d_FPN_IN5k_gn_dconv.yaml",
2323
}
2424
}

particleanalyzer/core/YOLOLoader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
class YOLOLoader:
66
MODEL_MAPPING = {
7-
"Yolo11 (dataset 9)": "Yolo11_d9_batch30.pt",
8-
"Yolo12 (dataset 9)": "Yolo12_d9_batch30.pt",
7+
"Yolo11 (dataset 9)": "Yolo11_d10_batch45.pt",
8+
"Yolo12 (dataset 9)": "Yolo12_d10_batch45.pt",
99
}
1010

1111
def __init__(self):

particleanalyzer/core/ui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ def create_interface(api_key):
533533
with gr.Tab(i18n("О программе")):
534534
gr.HTML(i18n(about_ru))
535535
with gr.Row(visible=False) as sidebar:
536-
with gr.Column(elem_classes="sidebar-fixed"):
536+
with gr.Sidebar(open=False, width=400):
537537
with gr.Row():
538538
gr.HTML(
539539
f"""<h2 style="display: flex; align-items: center; gap: 8px;">

particleanalyzer/core/ui_styles.py

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@
3838
transition: all 0.3s ease !important;
3939
}
4040
41+
.fillable {
42+
width: 100% !important;
43+
max-width: unset !important;
44+
}
45+
.fillable .sidebar-parent {
46+
padding-left: 10px !important;
47+
padding-right: 10px !important;
48+
}
49+
4150
.dark .gradio-container {
4251
background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
4352
}
@@ -62,20 +71,6 @@
6271
margin: 0 auto;
6372
}
6473
65-
/* === САЙДБАР === */
66-
.sidebar-fixed {
67-
position: fixed !important;
68-
top: 0;
69-
left: 0;
70-
width: 400px !important;
71-
height: 100vh !important;
72-
padding: 20px;
73-
box-shadow: -4px 0 15px rgba(0,0,0,0.2);
74-
background: white;
75-
overflow-y: auto;
76-
z-index: 9999;
77-
}
78-
7974
/* ==========================================================================
8075
🧩 ХЕДЕР
8176
========================================================================== */

particleanalyzer/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.2.2"
1+
__version__ = "1.2.3"

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def read_file(filename):
99

1010
setup(
1111
name="ParticleAnalyzer",
12-
version="1.2.2",
12+
version="1.2.3",
1313
packages=find_packages(exclude=["tests*"]),
1414
package_data={
1515
"particleanalyzer": [
@@ -24,7 +24,7 @@ def read_file(filename):
2424
],
2525
},
2626
install_requires=[
27-
"gradio==5.46.0",
27+
"gradio==5.47.0",
2828
"gradio-rangeslider",
2929
"matplotlib",
3030
"opencv-python",

0 commit comments

Comments
 (0)