Spaces:
Runtime error
Runtime error
Commit
·
3883f12
1
Parent(s):
82aafb5
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,8 @@ def extract_text_from_pdf(file_path, splitter = "\n\n"):
|
|
30 |
#write to csv
|
31 |
#df.to_csv(file_path[:-4]+'.csv', index=False)
|
32 |
return chunks
|
33 |
-
|
|
|
34 |
embeddings = OpenAIEmbeddings()
|
35 |
text = extract_text_from_pdf('transito-dgo.pdf','ARTÍCULO')
|
36 |
|
|
|
30 |
#write to csv
|
31 |
#df.to_csv(file_path[:-4]+'.csv', index=False)
|
32 |
return chunks
|
33 |
+
|
34 |
+
os.environ["OPENAI_API_KEY"] = 'sk-'+ os.environ["OPENAI_API_KEY"]
|
35 |
embeddings = OpenAIEmbeddings()
|
36 |
text = extract_text_from_pdf('transito-dgo.pdf','ARTÍCULO')
|
37 |
|