Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -55,7 +55,6 @@ def upload_file(file):
|
|
| 55 |
elif file.name.endswith('.csv') or file.name.endswith('.data'):
|
| 56 |
df = pd.read_csv(file.name, header=None)
|
| 57 |
df.columns = np.arange(len(df.columns))
|
| 58 |
-
print(df)
|
| 59 |
return df
|
| 60 |
|
| 61 |
|
|
@@ -76,14 +75,15 @@ The TabPFN will classify the values for all empty cells in the label column.
|
|
| 76 |
Please, provide everything but the label column as numeric values.
|
| 77 |
You can also upload datasets to fill the table automatically.
|
| 78 |
""")
|
| 79 |
-
inp_table = gr.DataFrame(type='numpy', value=example, headers=[''] * 3)
|
| 80 |
-
inp_file = gr.File(
|
| 81 |
-
label='Drop either a .csv (without header, only numeric values for all but the labels) or a .arff file.')
|
| 82 |
examples = gr.Examples(examples=['iris.csv', 'balance-scale.arff'],
|
| 83 |
inputs=[inp_file],
|
| 84 |
outputs=[inp_table],
|
| 85 |
fn=upload_file,
|
| 86 |
cache_examples=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
btn = gr.Button("Predict Empty Table Cells")
|
| 88 |
|
| 89 |
inp_file.change(fn=upload_file, inputs=inp_file, outputs=inp_table)
|
|
|
|
| 55 |
elif file.name.endswith('.csv') or file.name.endswith('.data'):
|
| 56 |
df = pd.read_csv(file.name, header=None)
|
| 57 |
df.columns = np.arange(len(df.columns))
|
|
|
|
| 58 |
return df
|
| 59 |
|
| 60 |
|
|
|
|
| 75 |
Please, provide everything but the label column as numeric values.
|
| 76 |
You can also upload datasets to fill the table automatically.
|
| 77 |
""")
|
|
|
|
|
|
|
|
|
|
| 78 |
examples = gr.Examples(examples=['iris.csv', 'balance-scale.arff'],
|
| 79 |
inputs=[inp_file],
|
| 80 |
outputs=[inp_table],
|
| 81 |
fn=upload_file,
|
| 82 |
cache_examples=True)
|
| 83 |
+
inp_table = gr.DataFrame(type='numpy', value=example, headers=[''] * 3)
|
| 84 |
+
upload_file('iris.csv')
|
| 85 |
+
inp_file = gr.File(
|
| 86 |
+
label='Drop either a .csv (without header, only numeric values for all but the labels) or a .arff file.')
|
| 87 |
btn = gr.Button("Predict Empty Table Cells")
|
| 88 |
|
| 89 |
inp_file.change(fn=upload_file, inputs=inp_file, outputs=inp_table)
|