datasetter458 commited on
Commit
da3bf5a
·
verified ·
1 Parent(s): c6cccba

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +43 -40
app.py CHANGED
@@ -47,27 +47,27 @@ if radio_buttons == "GPU":
47
  ROPs = st.text_input("the number of ROPs")
48
  mem_type = st.radio("select the memory type", ("GDDR5", "GDDR5X", "GDDR6", "GDDR6X", "GDDR7"))
49
 
50
- GPU_SPECS = gpu(
51
- # memory and graphics related specs
52
- transistors=int(transistors), # million transistor
53
- base_clock=int(base_clock), # in MHz
54
- mem_clock=int(mem_clock), # in MHz
55
- mem_size=int(mem_size), # in GBs
56
- shading_units=int(shading_units),
57
- TMUs=int(TMUs),
58
- ROPs=int(ROPs),
59
-
60
- # memory type
61
- mem_type_GDDR5=mem_type=="GDDR5",
62
- mem_type_GDDR5X=mem_type=="GDDR5X",
63
- mem_type_GDDR6=mem_type=="GDDR6",
64
- mem_type_GDDR6X=mem_type=="GDDR6X",
65
- mem_type_GDDR7=mem_type=="GDDR7"
66
- )
67
  if transistors and base_clock and mem_clock and mem_size and shading_units and TMUs and ROPs and mem_type:
68
- st.write("predictions with go here")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  else:
70
- st.write("you made a mistake")
 
71
  elif radio_buttons == "SSD":
72
  seq_read = st.text_input("the sequential read in MB/s")
73
  seq_write = st.text_input("the sequential write in MB/s")
@@ -76,27 +76,30 @@ elif radio_buttons == "SSD":
76
  interface = st.radio("give the SSD interface", ("PCIe 3.0 x4", "PCIe 4.0 x4", "PCIe 5.0 x4", "SATA 6GBps"))
77
  protocol = st.radio("give the protocol : ", ("AHCI", "NVMe", "NVMe 1.2", "NVMe 1.3", "NVMe 1.4", "NVMe 2.0"))
78
 
79
- SSD_SPECS = ssd(
80
- seq_read_write=int(seq_read) + int(seq_write), # in MB/s (sequential read + sequential write)
81
- endurance=int(endurance), # in TBW
 
82
 
83
- # SSD types
84
- type_MLC=type=="MLC",
85
- type_QLC=type=="QLC",
86
- type_SLC=type=="SLC",
87
- type_TLC=type=="TLC",
88
 
89
- # SSD interfaces
90
- interface_PCIe_3_0_x4=interface=="PCIe 3.0 x4",
91
- interface_PCIe_4_0_x4=interface=="PCIe 4.0 x4",
92
- interface_PCIe_5_0_x4=interface=="PCIe 5.0 x4",
93
- interface_SATA_6_Gbps=interface=="SATA 6GBps",
94
 
95
- # SSD protocols
96
- protocol_AHCI=protocol=="AHCI",
97
- protocol_NVMe=protocol=="NVMe",
98
- protocol_NVMe_1_2=protocol=="NVMe 1.2",
99
- protocol_NVMe_1_3=protocol=="NVMe 1.3",
100
- protocol_NVMe_1_4=protocol=="NVMe 1.4",
101
- protocol_NVMe_2_0=protocol=="NVMe 2.0"
102
- )
 
 
 
47
  ROPs = st.text_input("the number of ROPs")
48
  mem_type = st.radio("select the memory type", ("GDDR5", "GDDR5X", "GDDR6", "GDDR6X", "GDDR7"))
49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  if transistors and base_clock and mem_clock and mem_size and shading_units and TMUs and ROPs and mem_type:
51
+ GPU_SPECS = gpu(
52
+ # memory and graphics related specs
53
+ transistors=int(transistors), # million transistor
54
+ base_clock=int(base_clock), # in MHz
55
+ mem_clock=int(mem_clock), # in MHz
56
+ mem_size=int(mem_size), # in GBs
57
+ shading_units=int(shading_units),
58
+ TMUs=int(TMUs),
59
+ ROPs=int(ROPs),
60
+
61
+ # memory type
62
+ mem_type_GDDR5=mem_type == "GDDR5",
63
+ mem_type_GDDR5X=mem_type == "GDDR5X",
64
+ mem_type_GDDR6=mem_type == "GDDR6",
65
+ mem_type_GDDR6X=mem_type == "GDDR6X",
66
+ mem_type_GDDR7=mem_type == "GDDR7"
67
+ )
68
  else:
69
+ st.write("you need to fill all the inputs")
70
+
71
  elif radio_buttons == "SSD":
72
  seq_read = st.text_input("the sequential read in MB/s")
73
  seq_write = st.text_input("the sequential write in MB/s")
 
76
  interface = st.radio("give the SSD interface", ("PCIe 3.0 x4", "PCIe 4.0 x4", "PCIe 5.0 x4", "SATA 6GBps"))
77
  protocol = st.radio("give the protocol : ", ("AHCI", "NVMe", "NVMe 1.2", "NVMe 1.3", "NVMe 1.4", "NVMe 2.0"))
78
 
79
+ if seq_read and seq_write and endurance and type and interface and protocol:
80
+ SSD_SPECS = ssd(
81
+ seq_read_write=int(seq_read) + int(seq_write), # in MB/s (sequential read + sequential write)
82
+ endurance=int(endurance), # in TBW
83
 
84
+ # SSD types
85
+ type_MLC=type == "MLC",
86
+ type_QLC=type == "QLC",
87
+ type_SLC=type == "SLC",
88
+ type_TLC=type == "TLC",
89
 
90
+ # SSD interfaces
91
+ interface_PCIe_3_0_x4=interface == "PCIe 3.0 x4",
92
+ interface_PCIe_4_0_x4=interface == "PCIe 4.0 x4",
93
+ interface_PCIe_5_0_x4=interface == "PCIe 5.0 x4",
94
+ interface_SATA_6_Gbps=interface == "SATA 6GBps",
95
 
96
+ # SSD protocols
97
+ protocol_AHCI=protocol == "AHCI",
98
+ protocol_NVMe=protocol == "NVMe",
99
+ protocol_NVMe_1_2=protocol == "NVMe 1.2",
100
+ protocol_NVMe_1_3=protocol == "NVMe 1.3",
101
+ protocol_NVMe_1_4=protocol == "NVMe 1.4",
102
+ protocol_NVMe_2_0=protocol == "NVMe 2.0"
103
+ )
104
+ else:
105
+ st.write("you need to fill all the inputs")