Spaces:
Running
Running
changed the css
Browse files
app.py
CHANGED
@@ -1142,8 +1142,19 @@ button, select, .slider-percentage {
|
|
1142 |
color: #1e293b !important;
|
1143 |
margin-bottom: 1rem !important;
|
1144 |
text-align: center !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1145 |
}
|
1146 |
|
|
|
1147 |
'''
|
1148 |
# Define the file directory
|
1149 |
FILE_DIR = "fileHandler"
|
@@ -1151,8 +1162,6 @@ FILE_DIR = "fileHandler"
|
|
1151 |
# Function to get list of files
|
1152 |
def list_files():
|
1153 |
return ['Unsuccessful Strategies (ER)', 'Successful Strategies (ER)', 'Unsuccessful Strategies (ME)', 'Successful Strategies (ME)']
|
1154 |
-
# return ['output_task0_label0.csv', 'output_task0_label1.csv', 'output_task1_label0.csv', 'output_task1_label1.csv']
|
1155 |
-
# return [f for f in os.listdir(FILE_DIR) if os.path.isfile(os.path.join(FILE_DIR, f))]
|
1156 |
label_to_filename = {
|
1157 |
'Unsuccessful Strategies (ER)': 'ER-unsuccessful-strategies.csv',
|
1158 |
'Successful Strategies (ER)': 'ER-successful-strategies.csv',
|
@@ -1171,14 +1180,9 @@ def provide_file_path(label_name):
|
|
1171 |
|
1172 |
with gr.Blocks(theme='gstaff/sketch', css=custom_css) as demo:
|
1173 |
|
1174 |
-
# gr.Markdown("<h1 id='title'>ASTRA</h1>", elem_id="title")
|
1175 |
gr.Markdown(content)
|
1176 |
|
1177 |
with gr.Row():
|
1178 |
-
# file_input = gr.File(label="Upload a test file", file_types=['.txt'], elem_classes="file-box")
|
1179 |
-
# label_input = gr.File(label="Upload test labels", file_types=['.txt'], elem_classes="file-box")
|
1180 |
-
|
1181 |
-
# info_input = gr.File(label="Upload test info", file_types=['.txt'], elem_classes="file-box")
|
1182 |
model_dropdown = gr.Dropdown(
|
1183 |
choices=models,
|
1184 |
label="Select Fine-tuned Model",
|
@@ -1208,15 +1212,10 @@ with gr.Blocks(theme='gstaff/sketch', css=custom_css) as demo:
|
|
1208 |
with gr.Row():
|
1209 |
opt1_pie = gr.Plot(label="ER")
|
1210 |
opt2_pie = gr.Plot(label="ME")
|
1211 |
-
|
1212 |
-
# with gr.Row():
|
1213 |
-
# histo1 = gr.Plot(label="Hist")
|
1214 |
-
# histo2 = gr.Plot(label="Hist")
|
1215 |
-
# with gr.Row():
|
1216 |
-
# output_text_sampled_auc = gr.Textbox(label="")
|
1217 |
|
1218 |
with gr.Row():
|
1219 |
-
file_dropdown = gr.Dropdown(choices=list_files(), label="Select a strategy from the dropdown")
|
1220 |
download_button = gr.Button("Generate Strategies")
|
1221 |
with gr.Row():
|
1222 |
file_output = gr.File(label="Download File")
|
|
|
1142 |
color: #1e293b !important;
|
1143 |
margin-bottom: 1rem !important;
|
1144 |
text-align: center !important;
|
1145 |
+
|
1146 |
+
|
1147 |
+
}
|
1148 |
+
#dropdown-block {
|
1149 |
+
padding-top: 80px;
|
1150 |
+
}
|
1151 |
+
|
1152 |
+
#dropdown-block > label {
|
1153 |
+
margin-bottom: 65px;
|
1154 |
+
display: block;
|
1155 |
}
|
1156 |
|
1157 |
+
|
1158 |
'''
|
1159 |
# Define the file directory
|
1160 |
FILE_DIR = "fileHandler"
|
|
|
1162 |
# Function to get list of files
|
1163 |
def list_files():
|
1164 |
return ['Unsuccessful Strategies (ER)', 'Successful Strategies (ER)', 'Unsuccessful Strategies (ME)', 'Successful Strategies (ME)']
|
|
|
|
|
1165 |
label_to_filename = {
|
1166 |
'Unsuccessful Strategies (ER)': 'ER-unsuccessful-strategies.csv',
|
1167 |
'Successful Strategies (ER)': 'ER-successful-strategies.csv',
|
|
|
1180 |
|
1181 |
with gr.Blocks(theme='gstaff/sketch', css=custom_css) as demo:
|
1182 |
|
|
|
1183 |
gr.Markdown(content)
|
1184 |
|
1185 |
with gr.Row():
|
|
|
|
|
|
|
|
|
1186 |
model_dropdown = gr.Dropdown(
|
1187 |
choices=models,
|
1188 |
label="Select Fine-tuned Model",
|
|
|
1212 |
with gr.Row():
|
1213 |
opt1_pie = gr.Plot(label="ER")
|
1214 |
opt2_pie = gr.Plot(label="ME")
|
1215 |
+
|
|
|
|
|
|
|
|
|
|
|
1216 |
|
1217 |
with gr.Row():
|
1218 |
+
file_dropdown = gr.Dropdown(choices=list_files(), label="Select a strategy from the dropdown",elem_id="dropdown-block")
|
1219 |
download_button = gr.Button("Generate Strategies")
|
1220 |
with gr.Row():
|
1221 |
file_output = gr.File(label="Download File")
|