Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -153,7 +153,7 @@ def save_bibtex(bibtex_content):
|
|
153 |
class CombinedProcessor:
|
154 |
def process(self, user_message):
|
155 |
editorial_text = re.sub("\n", " ¶ ", user_message)
|
156 |
-
editorial_text = re.sub(r'\s*([
|
157 |
print(editorial_text)
|
158 |
num_tokens = len(tokenizer.tokenize(editorial_text))
|
159 |
|
@@ -168,8 +168,10 @@ class CombinedProcessor:
|
|
168 |
bibtex_entries = []
|
169 |
for entry in bibliography_entries:
|
170 |
print(entry)
|
|
|
171 |
entry = re.sub(r'- ?[\n¶] ?', r'', entry)
|
172 |
entry = re.sub(r' ?[\n¶] ?', r' ', entry)
|
|
|
173 |
bib_out = bibliography_classifier(entry)
|
174 |
bib_df = pd.DataFrame(bib_out)
|
175 |
|
|
|
153 |
class CombinedProcessor:
|
154 |
def process(self, user_message):
|
155 |
editorial_text = re.sub("\n", " ¶ ", user_message)
|
156 |
+
#editorial_text = re.sub(r'\s*([;:,])\s*', r' \1 ', editorial_text)
|
157 |
print(editorial_text)
|
158 |
num_tokens = len(tokenizer.tokenize(editorial_text))
|
159 |
|
|
|
168 |
bibtex_entries = []
|
169 |
for entry in bibliography_entries:
|
170 |
print(entry)
|
171 |
+
entry = re.sub(r'\s*([;:,\.])\s*', r' \1 ', entry)
|
172 |
entry = re.sub(r'- ?[\n¶] ?', r'', entry)
|
173 |
entry = re.sub(r' ?[\n¶] ?', r' ', entry)
|
174 |
+
print(entry)
|
175 |
bib_out = bibliography_classifier(entry)
|
176 |
bib_df = pd.DataFrame(bib_out)
|
177 |
|