syurek commited on
Commit
2c83804
·
verified ·
1 Parent(s): 9e010dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -12,7 +12,10 @@ def answer_question(file, question):
12
  if file is None:
13
  return "Lütfen önce bir JSON dosyası yükleyin."
14
 
15
- data = json.load(file)
 
 
 
16
  df = pd.DataFrame(data)
17
  context = df.to_string(index=False)
18
 
 
12
  if file is None:
13
  return "Lütfen önce bir JSON dosyası yükleyin."
14
 
15
+ # Dosyayı aç ve JSON olarak yükle
16
+ with open(file.name, "r", encoding="utf-8") as f:
17
+ data = json.load(f)
18
+
19
  df = pd.DataFrame(data)
20
  context = df.to_string(index=False)
21