Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,7 +37,7 @@ 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 |
'delimiter': ',',
|
| 42 |
'quotechar': '"',
|
| 43 |
'fieldnames': ["gameId", "blueWins", "blueWardsPlaced", "blueWardsDestroyed", "blueFirstBlood", "blueKills", "blueDeaths",
|
|
@@ -48,7 +48,7 @@ def get_csv_file(docs):
|
|
| 48 |
"redTotalGold", "redAvgLevel", "redTotalExperience", "redTotalMinionsKilled", "redTotalJungleMinionsKilled",
|
| 49 |
"redGoldDiff", "redExperienceDiff", "redCSPerMin", "redGoldPerMin"]
|
| 50 |
})
|
| 51 |
-
data =
|
| 52 |
return data
|
| 53 |
|
| 54 |
data = loader.load()
|
|
|
|
| 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 |
+
CSV_loader = CSVLoader(file_path= temp_filepath, csv_args={
|
| 41 |
'delimiter': ',',
|
| 42 |
'quotechar': '"',
|
| 43 |
'fieldnames': ["gameId", "blueWins", "blueWardsPlaced", "blueWardsDestroyed", "blueFirstBlood", "blueKills", "blueDeaths",
|
|
|
|
| 48 |
"redTotalGold", "redAvgLevel", "redTotalExperience", "redTotalMinionsKilled", "redTotalJungleMinionsKilled",
|
| 49 |
"redGoldDiff", "redExperienceDiff", "redCSPerMin", "redGoldPerMin"]
|
| 50 |
})
|
| 51 |
+
data = CSV_loader.load()
|
| 52 |
return data
|
| 53 |
|
| 54 |
data = loader.load()
|