Spaces:
Runtime error
Runtime error
Commit
·
862cd29
1
Parent(s):
7bc15eb
up
Browse files
app.py
CHANGED
@@ -9,6 +9,7 @@ import re
|
|
9 |
import pdfminer
|
10 |
|
11 |
print("pdfminer", print(pdfminer.__version__))
|
|
|
12 |
|
13 |
#from docx import Document
|
14 |
#document = Document()
|
@@ -119,9 +120,7 @@ def convert(*keywords):
|
|
119 |
|
120 |
num_files = 0
|
121 |
|
122 |
-
|
123 |
-
|
124 |
-
return "Yes"
|
125 |
|
126 |
for folder in tqdm.tqdm(glob.glob("./*")):
|
127 |
shutil.rmtree(RESULTS_FOLDER, ignore_errors=True)
|
@@ -138,7 +137,7 @@ def convert(*keywords):
|
|
138 |
|
139 |
return f"Retrieved from {num_files}"
|
140 |
|
141 |
-
inputs = [gr.Textbox(label=f"Enter your keywords for {k}", max_lines=2,
|
142 |
|
143 |
iface = gr.Interface(
|
144 |
fn=convert, inputs=inputs, outputs="text")
|
|
|
9 |
import pdfminer
|
10 |
|
11 |
print("pdfminer", print(pdfminer.__version__))
|
12 |
+
print("pandoc", print(pandoc.__version__))
|
13 |
|
14 |
#from docx import Document
|
15 |
#document = Document()
|
|
|
120 |
|
121 |
num_files = 0
|
122 |
|
123 |
+
return "_".join(codewords_mapping.keys())
|
|
|
|
|
124 |
|
125 |
for folder in tqdm.tqdm(glob.glob("./*")):
|
126 |
shutil.rmtree(RESULTS_FOLDER, ignore_errors=True)
|
|
|
137 |
|
138 |
return f"Retrieved from {num_files}"
|
139 |
|
140 |
+
inputs = [gr.Textbox(label=f"Enter your keywords for {k}", max_lines=2, placeholder=CAT_TO_CODEWORDS[k]) for k in CATEGORIES]
|
141 |
|
142 |
iface = gr.Interface(
|
143 |
fn=convert, inputs=inputs, outputs="text")
|