tahamueed23 commited on
Commit
0fcb11f
·
verified ·
1 Parent(s): a44add3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -162,7 +162,7 @@ def initialize_csv():
162
  """Initialize CSV file with proper UTF-8 encoding for Urdu support"""
163
  if not os.path.exists(CSV_FILE):
164
  df = pd.DataFrame(columns=[
165
- "ID", "Timestamp", "User", "Text", "Language", "Sentiment", "Confidence"
166
  ])
167
  df.to_csv(CSV_FILE, index=False, encoding='utf-8-sig', quoting=csv.QUOTE_ALL)
168
 
@@ -211,7 +211,7 @@ def load_logs(limit=50):
211
  return df.tail(limit).iloc[::-1].reset_index(drop=True)
212
  else:
213
  return pd.DataFrame(columns=[
214
- "ID", "Timestamp", "User", "Text", "Language", "Sentiment", "Confidence"
215
  ])
216
  except Exception as e:
217
  print(f"Error loading logs: {e}")
 
162
  """Initialize CSV file with proper UTF-8 encoding for Urdu support"""
163
  if not os.path.exists(CSV_FILE):
164
  df = pd.DataFrame(columns=[
165
+ "ID", "Timestamp", "Text", "Language", "Sentiment", "Confidence"
166
  ])
167
  df.to_csv(CSV_FILE, index=False, encoding='utf-8-sig', quoting=csv.QUOTE_ALL)
168
 
 
211
  return df.tail(limit).iloc[::-1].reset_index(drop=True)
212
  else:
213
  return pd.DataFrame(columns=[
214
+ "ID", "Timestamp", "Text", "Language", "Sentiment", "Confidence"
215
  ])
216
  except Exception as e:
217
  print(f"Error loading logs: {e}")