datawithsuman commited on
Commit
c710c88
1 Parent(s): 02f1b5e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -34,9 +34,9 @@ uploaded_files = st.file_uploader("Upload a PDF file", type="pdf", accept_multip
34
 
35
  if uploaded_files:
36
  for uploaded_file in uploaded_files:
37
- with open(f"../data/{uploaded_file.name}", 'wb') as f:
38
  f.write(uploaded_file.getbuffer())
39
- reader = SimpleDirectoryReader(input_files=[f"../data/{uploaded_file.name}"])
40
  documents = reader.load_data()
41
  st.success("File uploaded...")
42
 
@@ -56,7 +56,7 @@ if uploaded_files:
56
  )
57
 
58
  # Save Knowlege Graph
59
- index.property_graph_store.save_networkx_graph(name="../data/kg.html")
60
 
61
  # Display the graph in Streamlit
62
  st.success("File Processed...")
 
34
 
35
  if uploaded_files:
36
  for uploaded_file in uploaded_files:
37
+ with open(f"./data/{uploaded_file.name}", 'wb') as f:
38
  f.write(uploaded_file.getbuffer())
39
+ reader = SimpleDirectoryReader(input_files=[f"./data/{uploaded_file.name}"])
40
  documents = reader.load_data()
41
  st.success("File uploaded...")
42
 
 
56
  )
57
 
58
  # Save Knowlege Graph
59
+ index.property_graph_store.save_networkx_graph(name="./data/kg.html")
60
 
61
  # Display the graph in Streamlit
62
  st.success("File Processed...")