Spaces:
Build error
Build error
Commit Β·
08db112
1
Parent(s): e8eb4f6
Update app.py
Browse files24 unmodified lines2526272829303124 unmodified lines# κ³Όμ # μλ ν μ€νΈ μΆμΆ ν¨μλ₯Ό μμ±def get_text_file(docs):passdef get_csv_file(docs):pass24 unmodified lines2526272829303132333435363738394041424344454624 unmodified lines# κ³Όμ # μλ ν μ€νΈ μΆμΆ ν¨μλ₯Ό μμ±def get_text_file(docs):# .txt νμΌμ λ΄μ©μ λ΄μ λ³μtxt_content = ""# μμ λλ ν 리 μμ±temp_dir = tempfile.TemporaryDirectory()temp_filepath = os.path.join(temp_dir.name, docs.name)# .txt νμΌμ λ΄μ©μ μμ νμΌμ μλλ€.with open(temp_filepath, "wb") as f:f.write(docs.getvalue())# .txt νμΌμ μ½μ΄μ λ΄μ©μ txt_contentμ μ μ₯ν©λλ€.with open(temp_filepath, "r", encoding="utf-8") as f:txt_content = f.read()return txt_contentdef get_csv_file(docs):pass
app.py+16-1