Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
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 |
|