Spaces:
Running
Running
Sean Hamill
commited on
Commit
·
14b60e8
1
Parent(s):
83fb568
works
Browse files
app.py
CHANGED
@@ -25,9 +25,10 @@ class ChatWrapper:
|
|
25 |
self.lock.acquire()
|
26 |
try:
|
27 |
history = history or []
|
28 |
-
|
29 |
-
|
30 |
-
response =
|
|
|
31 |
history.append((input, str(response)))
|
32 |
except Exception as e:
|
33 |
|
@@ -42,7 +43,7 @@ def make_status_box_visible():
|
|
42 |
def create_index():
|
43 |
documents = SimpleDirectoryReader('data').load_data()
|
44 |
index = GPTSimpleVectorIndex(documents)
|
45 |
-
|
46 |
|
47 |
def pdf_to_text(file_obj, progress=gr.Progress()):
|
48 |
progress(0.2, desc="Uploading file...")
|
|
|
25 |
self.lock.acquire()
|
26 |
try:
|
27 |
history = history or []
|
28 |
+
documents = SimpleDirectoryReader('data').load_data()
|
29 |
+
index = GPTSimpleVectorIndex(documents)
|
30 |
+
response = index.query(input, verbose=True)
|
31 |
+
|
32 |
history.append((input, str(response)))
|
33 |
except Exception as e:
|
34 |
|
|
|
43 |
def create_index():
|
44 |
documents = SimpleDirectoryReader('data').load_data()
|
45 |
index = GPTSimpleVectorIndex(documents)
|
46 |
+
|
47 |
|
48 |
def pdf_to_text(file_obj, progress=gr.Progress()):
|
49 |
progress(0.2, desc="Uploading file...")
|