quick fix
Browse files
app.py
CHANGED
|
@@ -122,34 +122,33 @@ flask_app = Flask(__name__)
|
|
| 122 |
|
| 123 |
vectordb = vectorstore(path="data/PDF/Cancer The Evolutionary Legacy .pdf", Initlize_with=1)
|
| 124 |
print("done creating vectorstore")
|
| 125 |
-
vectordb.add_to_vectorstore_from_pdf("data/PDF/cancer_dictionary.pdf")
|
| 126 |
-
print("done adding cancer dictionary")
|
| 127 |
|
| 128 |
-
vectordb.add_to_vectorstore_from_pdf("data/PDF/Colon and Other GastrointestinalCancers.pdf")
|
| 129 |
-
print("done adding colon and other gastrointestinal cancers")
|
| 130 |
|
| 131 |
-
vectordb.add_to_vectorstore_from_pdf("data/PDF/Medical Dictionary.pdf")
|
| 132 |
-
print("done adding medical dictionary")
|
| 133 |
|
| 134 |
-
vectordb.add_to_vectorstore_from_pdf("data/PDF/Molecular biology of cancer.pdf")
|
| 135 |
-
print("done adding molecular biology of cancer")
|
| 136 |
|
| 137 |
-
vectordb.add_to_vectorstore_from_pdf("data/PDF/The biology of cancer.pdf")
|
| 138 |
-
print("done adding the biology of cancer")
|
| 139 |
|
| 140 |
-
vectordb.add_to_vectorstore_from_pdf("data/PDF/Being mortal _ medicine and what matters in the end .pdf")
|
| 141 |
-
print("done adding the biology of cancer")
|
| 142 |
|
| 143 |
-
vectordb.add_to_vectorstore_from_pdf("data/PDF/The Emperor of All Maladies_ A Biography of Cancer.pdf")
|
| 144 |
-
print("done adding the biology of cancer")
|
| 145 |
|
| 146 |
-
print("finished vectorization")
|
| 147 |
|
| 148 |
vectordb_path = "VectorDB/vectorstore_mainV2"
|
| 149 |
cancer_app_instance = CancerApp(vectordb_path)
|
| 150 |
|
| 151 |
-
|
| 152 |
-
Endpoint for text-to-text processing.
|
| 153 |
@flask_app.route('/text_to_text', methods=['POST'])
|
| 154 |
def api_text_to_text():
|
| 155 |
data = request.get_json()
|
|
|
|
| 122 |
|
| 123 |
vectordb = vectorstore(path="data/PDF/Cancer The Evolutionary Legacy .pdf", Initlize_with=1)
|
| 124 |
print("done creating vectorstore")
|
| 125 |
+
# vectordb.add_to_vectorstore_from_pdf("data/PDF/cancer_dictionary.pdf")
|
| 126 |
+
# print("done adding cancer dictionary")
|
| 127 |
|
| 128 |
+
# vectordb.add_to_vectorstore_from_pdf("data/PDF/Colon and Other GastrointestinalCancers.pdf")
|
| 129 |
+
# print("done adding colon and other gastrointestinal cancers")
|
| 130 |
|
| 131 |
+
# vectordb.add_to_vectorstore_from_pdf("data/PDF/Medical Dictionary.pdf")
|
| 132 |
+
# print("done adding medical dictionary")
|
| 133 |
|
| 134 |
+
# vectordb.add_to_vectorstore_from_pdf("data/PDF/Molecular biology of cancer.pdf")
|
| 135 |
+
# print("done adding molecular biology of cancer")
|
| 136 |
|
| 137 |
+
# vectordb.add_to_vectorstore_from_pdf("data/PDF/The biology of cancer.pdf")
|
| 138 |
+
# print("done adding the biology of cancer")
|
| 139 |
|
| 140 |
+
# vectordb.add_to_vectorstore_from_pdf("data/PDF/Being mortal _ medicine and what matters in the end .pdf")
|
| 141 |
+
# print("done adding the biology of cancer")
|
| 142 |
|
| 143 |
+
# vectordb.add_to_vectorstore_from_pdf("data/PDF/The Emperor of All Maladies_ A Biography of Cancer.pdf")
|
| 144 |
+
# print("done adding the biology of cancer")
|
| 145 |
|
| 146 |
+
# print("finished vectorization")
|
| 147 |
|
| 148 |
vectordb_path = "VectorDB/vectorstore_mainV2"
|
| 149 |
cancer_app_instance = CancerApp(vectordb_path)
|
| 150 |
|
| 151 |
+
#Endpoint for text-to-text processing.
|
|
|
|
| 152 |
@flask_app.route('/text_to_text', methods=['POST'])
|
| 153 |
def api_text_to_text():
|
| 154 |
data = request.get_json()
|