Qifan Zhang
commited on
Commit
·
e32f803
1
Parent(s):
8d09ff7
update excel support
Browse files- app.py +1 -1
- requirements.txt +1 -0
app.py
CHANGED
|
@@ -10,7 +10,7 @@ from utils.models import list_models
|
|
| 10 |
|
| 11 |
def read_data(filepath: str) -> Optional[pd.DataFrame]:
|
| 12 |
if filepath.endswith('.xlsx'):
|
| 13 |
-
df = pd.
|
| 14 |
elif filepath.endswith('.csv'):
|
| 15 |
df = pd.read_csv(filepath)
|
| 16 |
else:
|
|
|
|
| 10 |
|
| 11 |
def read_data(filepath: str) -> Optional[pd.DataFrame]:
|
| 12 |
if filepath.endswith('.xlsx'):
|
| 13 |
+
df = pd.read_excel(filepath)
|
| 14 |
elif filepath.endswith('.csv'):
|
| 15 |
df = pd.read_csv(filepath)
|
| 16 |
else:
|
requirements.txt
CHANGED
|
@@ -5,5 +5,6 @@ torch
|
|
| 5 |
transformers
|
| 6 |
sentence-transformers
|
| 7 |
|
|
|
|
| 8 |
tabulate
|
| 9 |
gradio
|
|
|
|
| 5 |
transformers
|
| 6 |
sentence-transformers
|
| 7 |
|
| 8 |
+
openpyxl
|
| 9 |
tabulate
|
| 10 |
gradio
|