Spaces:
Runtime error
Runtime error
SharmaAmit1818
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -10,8 +10,8 @@ model = BertForSequenceClassification.from_pretrained('huawei-noah/TinyBERT_Gene
|
|
10 |
# Function to process the CSV file and generate predictions
|
11 |
def process_csv(file):
|
12 |
try:
|
13 |
-
# Read the CSV file using Pandas
|
14 |
-
df = pd.read_csv(file
|
15 |
|
16 |
# Debugging: Print the DataFrame shape and columns
|
17 |
print(f"DataFrame shape: {df.shape}")
|
|
|
10 |
# Function to process the CSV file and generate predictions
|
11 |
def process_csv(file):
|
12 |
try:
|
13 |
+
# Read the CSV file using Pandas directly from the uploaded file object
|
14 |
+
df = pd.read_csv(file) # Use the file object directly
|
15 |
|
16 |
# Debugging: Print the DataFrame shape and columns
|
17 |
print(f"DataFrame shape: {df.shape}")
|