FridayMaster commited on
Commit
90198de
·
verified ·
1 Parent(s): 87f6591

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -5,6 +5,8 @@ from langchain.vectorstores import FAISS
5
  import torch
6
  from transformers import AutoTokenizer, AutoModel
7
  import gradio as gr
 
 
8
 
9
  # Load and preprocess PDF text
10
  def extract_text_from_pdf(pdf_path):
@@ -16,7 +18,8 @@ def extract_text_from_pdf(pdf_path):
16
  return text
17
 
18
  # Extract text from the PDF
19
- pdf_text = extract_text_from_pdf('FridayMaster/CHATBOT1/Getting Started with Ubuntu 16.04.pdf') # Replace with your PDF path
 
20
 
21
  # Convert the text to a DataFrame
22
  df = pd.DataFrame({'text': [pdf_text]})
 
5
  import torch
6
  from transformers import AutoTokenizer, AutoModel
7
  import gradio as gr
8
+ from langchain_community.vectorstores import FAISS
9
+
10
 
11
  # Load and preprocess PDF text
12
  def extract_text_from_pdf(pdf_path):
 
18
  return text
19
 
20
  # Extract text from the PDF
21
+ pdf_text = extract_text_from_pdf('Getting Started with Ubuntu 16.04.pdf')
22
+
23
 
24
  # Convert the text to a DataFrame
25
  df = pd.DataFrame({'text': [pdf_text]})