Spaces:
Runtime error
Runtime error
Eachan Johnson commited on
Commit ·
69a6087
1
Parent(s): 55dea1b
Wrap column headers
Browse files
app.py
CHANGED
|
@@ -163,10 +163,10 @@ def _prediction_loop(
|
|
| 163 |
cache=CACHE,
|
| 164 |
).with_format("numpy")["__prediction__"].flatten()
|
| 165 |
print(prediction)
|
| 166 |
-
this_col = f"{species}:
|
| 167 |
df[this_col] = np.power(10., -prediction) * 1e6
|
| 168 |
prediction_cols.append(this_col)
|
| 169 |
-
this_col = f"{species}:
|
| 170 |
df[this_col] = np.power(10., -prediction) * 1e3 * df["mwt"]
|
| 171 |
prediction_cols.append(this_col)
|
| 172 |
|
|
@@ -175,7 +175,7 @@ def _prediction_loop(
|
|
| 175 |
print_err(message)
|
| 176 |
gr.Info(message, duration=10)
|
| 177 |
# this_modelbox._input_training_data = this_modelbox._input_training_data.remove_columns([this_modelbox._in_key])
|
| 178 |
-
this_col = f"{species}:
|
| 179 |
prediction_cols.append(this_col)
|
| 180 |
print(">>>", this_modelbox._input_training_data)
|
| 181 |
print(">>>", this_modelbox._input_training_data.format)
|
|
@@ -513,7 +513,6 @@ def _initial_setup():
|
|
| 513 |
output_line = gr.DataFrame(
|
| 514 |
label="Predictions (scroll left and right)",
|
| 515 |
interactive=False,
|
| 516 |
-
max_chars=75,
|
| 517 |
pinned_columns=3,
|
| 518 |
visible=True,
|
| 519 |
)
|
|
|
|
| 163 |
cache=CACHE,
|
| 164 |
).with_format("numpy")["__prediction__"].flatten()
|
| 165 |
print(prediction)
|
| 166 |
+
this_col = f"{species}:\npredicted MIC (µM)"
|
| 167 |
df[this_col] = np.power(10., -prediction) * 1e6
|
| 168 |
prediction_cols.append(this_col)
|
| 169 |
+
this_col = f"{species}:\npredicted MIC (µg / mL)"
|
| 170 |
df[this_col] = np.power(10., -prediction) * 1e3 * df["mwt"]
|
| 171 |
prediction_cols.append(this_col)
|
| 172 |
|
|
|
|
| 175 |
print_err(message)
|
| 176 |
gr.Info(message, duration=10)
|
| 177 |
# this_modelbox._input_training_data = this_modelbox._input_training_data.remove_columns([this_modelbox._in_key])
|
| 178 |
+
this_col = f"{species}:\n{extra_metric}"
|
| 179 |
prediction_cols.append(this_col)
|
| 180 |
print(">>>", this_modelbox._input_training_data)
|
| 181 |
print(">>>", this_modelbox._input_training_data.format)
|
|
|
|
| 513 |
output_line = gr.DataFrame(
|
| 514 |
label="Predictions (scroll left and right)",
|
| 515 |
interactive=False,
|
|
|
|
| 516 |
pinned_columns=3,
|
| 517 |
visible=True,
|
| 518 |
)
|