Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -37,18 +37,8 @@ def get_csv_file(docs):
|
|
37 |
temp_filepath = os.path.join(temp_dir.name, docs.name) # ์์ ํ์ผ ๊ฒฝ๋ก๋ฅผ ์์ฑํฉ๋๋ค.
|
38 |
with open(temp_filepath, "wb") as f: # ์์ ํ์ผ์ ๋ฐ์ด๋๋ฆฌ ์ฐ๊ธฐ ๋ชจ๋๋ก ์ฝ๋๋ค.
|
39 |
f.write(docs.getvalue())
|
40 |
-
|
41 |
-
|
42 |
-
'quotechar': '"',
|
43 |
-
'fieldnames': ["gameId", "blueWins", "blueWardsPlaced", "blueWardsDestroyed", "blueFirstBlood", "blueKills", "blueDeaths",
|
44 |
-
"blueAssists", "blueEliteMonsters", "blueDragons", "blueHeralds", "blueTowersDestroyed", "blueTotalGold",
|
45 |
-
"blueAvgLevel", "blueTotalExperience", "blueTotalMinionsKilled", "blueTotalJungleMinionsKilled", "blueGoldDiff",
|
46 |
-
"blueExperienceDiff", "blueCSPerMin", "blueGoldPerMin", "redWardsPlaced", "redWardsDestroyed", "redFirstBlood",
|
47 |
-
"redKills", "redDeaths", "redAssists", "redEliteMonsters", "redDragons", "redHeralds", "redTowersDestroyed",
|
48 |
-
"redTotalGold", "redAvgLevel", "redTotalExperience", "redTotalMinionsKilled", "redTotalJungleMinionsKilled",
|
49 |
-
"redGoldDiff", "redExperienceDiff", "redCSPerMin", "redGoldPerMin"]
|
50 |
-
})
|
51 |
-
data = CSV_loader.load()
|
52 |
return data
|
53 |
|
54 |
|
|
|
37 |
temp_filepath = os.path.join(temp_dir.name, docs.name) # ์์ ํ์ผ ๊ฒฝ๋ก๋ฅผ ์์ฑํฉ๋๋ค.
|
38 |
with open(temp_filepath, "wb") as f: # ์์ ํ์ผ์ ๋ฐ์ด๋๋ฆฌ ์ฐ๊ธฐ ๋ชจ๋๋ก ์ฝ๋๋ค.
|
39 |
f.write(docs.getvalue())
|
40 |
+
loader = CSVLoader(file_path= temp_filepath)
|
41 |
+
data = loader.load()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
return data
|
43 |
|
44 |
|