SharmaAmit1818 commited on
Commit
1152b2a
·
verified ·
1 Parent(s): efa0dd9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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.name) # Ensure correct file path
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}")