Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,18 @@ 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 |
-
loader = CSVLoader(file_path=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
data = loader.load()
|
42 |
return data
|
43 |
|
|
|
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='./example_data/mlb_teams_2012.csv', csv_args={
|
41 |
+
'delimiter': ',',
|
42 |
+
'quotechar': '"',
|
43 |
+
'fieldnames': [
|
44 |
+
"gameId", "blueWins", "blueWardsPlaced", "blueWardsDestroyed", "blueFirstBlood", "blueKills", "blueDeaths",
|
45 |
+
"blueAssists", "blueEliteMonsters", "blueDragons", "blueHeralds", "blueTowersDestroyed", "blueTotalGold",
|
46 |
+
"blueAvgLevel", "blueTotalExperience", "blueTotalMinionsKilled", "blueTotalJungleMinionsKilled", "blueGoldDiff",
|
47 |
+
"blueExperienceDiff", "blueCSPerMin", "blueGoldPerMin", "redWardsPlaced", "redWardsDestroyed", "redFirstBlood",
|
48 |
+
"redKills", "redDeaths", "redAssists", "redEliteMonsters", "redDragons", "redHeralds", "redTowersDestroyed",
|
49 |
+
"redTotalGold", "redAvgLevel", "redTotalExperience", "redTotalMinionsKilled", "redTotalJungleMinionsKilled",
|
50 |
+
"redGoldDiff", "redExperienceDiff", "redCSPerMin", "redGoldPerMin"]
|
51 |
+
})
|
52 |
data = loader.load()
|
53 |
return data
|
54 |
|