shoom013 commited on
Commit
dd3611a
·
verified ·
1 Parent(s): 037abb6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -114,8 +114,7 @@ def rag(input_text, file):
114
  # )
115
 
116
  def upload_file(filepath):
117
- name = Path(filepath).name
118
- documents = SimpleDirectoryReader(file).load_data()
119
  index = VectorStoreIndex.from_documents(documents)
120
  query_engine = index.as_query_engine()
121
  return filepath
 
114
  # )
115
 
116
  def upload_file(filepath):
117
+ documents = SimpleDirectoryReader(filepath).load_data()
 
118
  index = VectorStoreIndex.from_documents(documents)
119
  query_engine = index.as_query_engine()
120
  return filepath