Update app.py
Browse files
app.py
CHANGED
@@ -162,14 +162,14 @@ def infer(inputs, additional_inputs):
|
|
162 |
return [gr.ScatterPlot(
|
163 |
value=df_val,
|
164 |
x="Prediction",
|
165 |
-
y="
|
166 |
title="Scatter",
|
167 |
-
tooltip=["Prediction", "
|
168 |
x_lim=[min(min(predictions), min(df_val[y_column]))-0.25, max(max(predictions), max(df_val[y_column]))+0.25],
|
169 |
y_lim=[min(min(predictions), min(df_val[y_column]))-0.25, max(max(predictions), max(df_val[y_column]))+0.25]
|
170 |
),
|
171 |
gr.Image(Image.open('tmp.png')),
|
172 |
-
df_val[['
|
173 |
|
174 |
def upload_csv(file):
|
175 |
df = pd.read_csv(file.name,
|
@@ -183,7 +183,7 @@ df = pd.read_csv('data.csv')
|
|
183 |
headers = df.columns.tolist()
|
184 |
|
185 |
inputs = [gr.Dataframe(headers=headers, row_count = (8, "dynamic"), datatype='number', col_count=(4,"fixed"), label="Dataset", interactive=1)]
|
186 |
-
outputs = [gr.ScatterPlot(), gr.Image(), gr.Dataframe(row_count = (2, "dynamic"), col_count=(2, "fixed"), datatype='number', label="Results", headers=["
|
187 |
|
188 |
with gr.Blocks() as demo:
|
189 |
|
|
|
162 |
return [gr.ScatterPlot(
|
163 |
value=df_val,
|
164 |
x="Prediction",
|
165 |
+
y="Target",
|
166 |
title="Scatter",
|
167 |
+
tooltip=["Prediction", "Target"],
|
168 |
x_lim=[min(min(predictions), min(df_val[y_column]))-0.25, max(max(predictions), max(df_val[y_column]))+0.25],
|
169 |
y_lim=[min(min(predictions), min(df_val[y_column]))-0.25, max(max(predictions), max(df_val[y_column]))+0.25]
|
170 |
),
|
171 |
gr.Image(Image.open('tmp.png')),
|
172 |
+
df_val[['Target', 'Prediction']], ]
|
173 |
|
174 |
def upload_csv(file):
|
175 |
df = pd.read_csv(file.name,
|
|
|
183 |
headers = df.columns.tolist()
|
184 |
|
185 |
inputs = [gr.Dataframe(headers=headers, row_count = (8, "dynamic"), datatype='number', col_count=(4,"fixed"), label="Dataset", interactive=1)]
|
186 |
+
outputs = [gr.ScatterPlot(), gr.Image(), gr.Dataframe(row_count = (2, "dynamic"), col_count=(2, "fixed"), datatype='number', label="Results", headers=["Target", "Prediction"])]
|
187 |
|
188 |
with gr.Blocks() as demo:
|
189 |
|