ready2drop commited on
Commit
57cae00
ยท
verified ยท
1 Parent(s): ae9b7f8

description

Browse files
Files changed (1) hide show
  1. view.py +54 -55
view.py CHANGED
@@ -1,56 +1,55 @@
1
- # Gradio
2
- examples = [
3
- [
4
- [['1', '0', '0', '104', '24', '10.6', '171', '14.54', '236', '182', '12.33', '3.2', '72']],
5
- "PT_NO = 10001862, VISIBLE_STONE_CT = True, REAL_STONE = True",
6
- ],
7
- [
8
- [['0', '1','0','106','18','13.6', '388', '21.13', '196', '118', '1.87', '2.7', '58']],
9
- "PT_NO = 10007376, VISIBLE_STONE_CT = True, REAL_STONE = True",
10
- ],
11
- [
12
- [['1', '0','1','205','18','9.3', '103', '8.45', '440', '100', '4.21', '4.5', '63']],
13
- "PT_NO = 10040285, VISIBLE_STONE_CT = False, REAL_STONE = True",
14
- ],
15
- [
16
- [['0', '1','1','130','20','12.1', '192', '8.63', '47', '59', '0.02', '0.4', '57']],
17
- "PT_NO = 10005545, VISIBLE_STONE_CT = False, REAL_STONE = False",
18
- ],
19
- ]
20
-
21
- tabular_header = ['DUCT_DILIATATION_8MM', 'DUCT_DILIATATION_10MM','PANCREATITIS','FIRST_SBP','FIRST_RR','Hb', 'PLT', 'WBC', 'ALP', 'AST', 'CRP', 'BILIRUBIN', 'AGE']
22
-
23
- description = """
24
- GPU ๋ฆฌ์†Œ์Šค ์ œ์•ฝ์œผ๋กœ ์ธํ•ด, ์˜จ๋ผ์ธ ๋ฐ๋ชจ์—์„œ๋Š” NVIDIA RTX 3090 24GB๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. \n
25
-
26
- **Note**: ํ˜„์žฌ ์ €ํฌ ๋ชจ๋ธ์€ **์ด๋‹ด๊ด€๊ฒฐ์„์ฆ**์˜ ๋ถ„์„ ๋ฐ ์ง„๋‹จ์„ ์ค‘์‹ฌ์œผ๋กœ ์ตœ์ ํ™”๋˜์–ด ์žˆ์œผ๋ฉฐ, ์ •ํ™•ํ•˜๊ณ  ์‹ ๋ขฐํ•  ์ˆ˜ ์žˆ๋Š” ๊ฒฐ๊ณผ๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. \n
27
- ๋ชจ๋ธ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ž…๋ ฅ ๋ฐ์ดํ„ฐ๋ฅผ ์ฒ˜๋ฆฌํ•˜๋ฉฐ, ์•„๋ž˜์™€ ๊ฐ™์ด ๊ฐ๊ฐ **์ด์‚ฐํ˜•(discrete)** **์—ฐ์†ํ˜•(continuous)** ๋ฐ์ดํ„ฐ๋กœ ์ฒ˜๋ฆฌ๋ฉ๋‹ˆ๋‹ค. \n
28
-
29
- - ์ด์‚ฐํ˜• ๋ณ€์ˆ˜:
30
- - DUCT_DILIATATION_8MM
31
- - DUCT_DILIATATION_10MM
32
- - PANCREATITIS
33
-
34
- - ์—ฐ์†ํ˜• ๋ณ€์ˆ˜:
35
- - FIRST_SBP (Systolic blood pressure)
36
- - FIRST_RR (Respiratory rate)
37
- - Hb (Hemoglobin)
38
- - PLT (Platelet)
39
- - WBC (White Blood Cell)
40
- - ALP (Alkaline Phosphatase)
41
- - ALT (Alanine Aminotransferase)
42
- - AST (Aspartate Aminotransferase)
43
- - CRP (C-Reactive Protein)
44
- - BILIRUBIN
45
- - AGE
46
-
47
- **์ค‘์š”**: ์ž…๋ ฅ ๋ฐ์ดํ„ฐ์˜ ์ปฌ๋Ÿผ์ด ๋ณ€๊ฒฝ(์ถ”๊ฐ€, ์‚ญ์ œ)๋  ๊ฒฝ์šฐ, ๋ชจ๋ธ์˜ ์˜ˆ์ธก ๊ฒฐ๊ณผ๊ฐ€ ๋‹ฌ๋ผ์งˆ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. \n
48
- ๋”ฐ๋ผ์„œ ์ž…๋ ฅ ๋ฐ์ดํ„ฐ์˜ ๊ตฌ์กฐ๋ฅผ ๋ณ€๊ฒฝํ•˜๊ธฐ ์ „์— ๋ชจ๋ธ์˜ ์žฌํ•™์Šต ๋˜๋Š” ์žฌ๊ฒ€์ฆ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. \n
49
- """
50
-
51
- title_markdown = ("""
52
- # ์ž„์ƒ ๋ฐ์ดํ„ฐ ๊ธฐ๋ฐ˜ ๋จธ์‹ ๋Ÿฌ๋‹์„ ์ด์šฉํ•œ ์ด๋‹ด๊ด€์„ ์˜ˆ์ธก ๋ชจ๋ธ
53
- ## Development of a Common Bile Duct Stone Prediction Model Using Machine Learning Based on Clinical Data
54
- [๐Ÿ“–[Learn more about Common Bile Duct Stones (์ด๋‹ด๊ด€๊ฒฐ์„์ฆ)](https://namu.wiki/w/%EC%B4%9D%EB%8B%B4%EA%B4%80%EA%B2%B0%EC%84%9D%EC%A6%9D)]
55
- ### Copyright ยฉ 2024 Dongguk University (DGU) and Dongguk University Medical Center (DUMC). All rights reserved.
56
  """)
 
1
+ # Gradio
2
+ examples = [
3
+ [
4
+ [['100.0', '24.0', '38.2', '72', '0.0', '1.0', '14.54','236.0','548.0','182.0','12.33','3.2','355.0']],
5
+ "PT_NO = 10001862, VISIBLE_STONE_CT = True, REAL_STONE = True",
6
+ ],
7
+
8
+ [
9
+ [['81.0','18.0','36.1','58','0.0','1.0','21.13','196.0','70.0','118.0','1.87','2.7','359.0']],
10
+ "PT_NO = 10007376, VISIBLE_STONE_CT = True, REAL_STONE = True",
11
+ ],
12
+ [
13
+ [['80.0','18.0','36.6','63','1.0','0.0','8.45','440.0','199.0','100.0','4.21','4.5','365.0']],
14
+ "PT_NO = 10040285, VISIBLE_STONE_CT = False, REAL_STONE = True",
15
+ ],
16
+ [
17
+ [['83.0','20.0','36.7','57','1.0','1.0','8.63','47.0','32.0','59.0','0.02','0.4','359.0']],
18
+ "PT_NO = 10005545, VISIBLE_STONE_CT = False, REAL_STONE = False",
19
+ ],
20
+ ]
21
+
22
+ tabular_header = ['FIRST_HR', 'FIRST_RR', 'FIRST_BT','AGE', 'PANCREATITIS', 'DUCT_DILIATATION_10MM', 'WBC', 'ALP', 'ALT', 'AST','CRP', 'BILIRUBIN','GGT']
23
+
24
+ description = """
25
+ Due to GPU resource constraints, the online demo is running on 2 vCPUs and 16 GB of RAM. \n
26
+
27
+ **Note**: This model is specifically designed for the diagnosis and prediction of common bile duct(CBD) stones and provides accurate and reliable results. \n
28
+ The input data consists of the following **discrete** and **continuous** variables, all of which play a significant role in the model's performance \n
29
+
30
+ - Discrete Variables:
31
+ - DUCT_DILIATATION_10MM (Presence of common bile duct dilation (โ‰ฅ10mm))
32
+ - PANCREATITIS (Presence of pancreatitis)
33
+
34
+ - Continuous Variables:
35
+ - FIRST_HR: Initial heart rate (Float)
36
+ - FIRST_RR: Initial respiratory rate (Float)
37
+ - FIRST_BT: Initial body temperature (Float)
38
+ - AGE: Age
39
+ - WBC: White blood cell count (Float)
40
+ - ALP: Alkaline phosphatase (Float)
41
+ - ALT: Alanine aminotransferase (Float)
42
+ - AST: Aspartate aminotransferase (Float)
43
+ - CRP: C-reactive protein (Float)
44
+ - BILIRUBIN: Bilirubin level (Float)
45
+ - GGT: Gamma-glutamyl transferase (Float)
46
+
47
+ **Important**: Changes to the structure of the input data (e.g., adding, removing columns) may affect the model's predictions. \n
48
+ Therefore, it is essential to retrain or revalidate the model if any modifications are made to the input data structure. \n
49
+ """
50
+
51
+ title_markdown = ("""
52
+ ## Development of a Common Bile Duct Stone Prediction Model Using Machine Learning Based on Clinical Data
53
+ [๐Ÿ“–[Learn more about Common Bile Duct Stones (https://namu.wiki/w/%EC%B4%9D%EB%8B%B4%EA%B4%80%EA%B2%B0%EC%84%9D%EC%A6%9D)]
54
+ ### Copyright ยฉ 2024 Dongguk University (DGU) and Dongguk University Medical Center (DUMC). All rights reserved.
 
55
  """)