Spaces:
Runtime error
Runtime error
Peter
commited on
Commit
·
98bcb65
1
Parent(s):
ab8d5cf
remove proper noun checks
Browse files
app.py
CHANGED
@@ -121,13 +121,10 @@ def ask_gpt(
|
|
121 |
gpt_rt = round(gpt_et - st, 2)
|
122 |
rawtxt = resp["out_text"]
|
123 |
# check for proper nouns
|
124 |
-
if basic_sc
|
125 |
cln_resp = symspeller(rawtxt, sym_checker=schnellspell)
|
126 |
-
elif not detect_propers(rawtxt):
|
127 |
-
cln_resp = synthesize_grammar(corrector=grammarbot, message=cln_resp)
|
128 |
else:
|
129 |
-
|
130 |
-
cln_resp = rawtxt.strip()
|
131 |
bot_resp_a = corr(remove_repeated_words(cln_resp))
|
132 |
bot_resp = fix_punct_spacing(bot_resp_a)
|
133 |
print(f"the prompt was:\n\t{message}\nand the response was:\n\t{bot_resp}\n")
|
|
|
121 |
gpt_rt = round(gpt_et - st, 2)
|
122 |
rawtxt = resp["out_text"]
|
123 |
# check for proper nouns
|
124 |
+
if basic_sc:
|
125 |
cln_resp = symspeller(rawtxt, sym_checker=schnellspell)
|
|
|
|
|
126 |
else:
|
127 |
+
cln_resp = synthesize_grammar(corrector=grammarbot, message=cln_resp)
|
|
|
128 |
bot_resp_a = corr(remove_repeated_words(cln_resp))
|
129 |
bot_resp = fix_punct_spacing(bot_resp_a)
|
130 |
print(f"the prompt was:\n\t{message}\nand the response was:\n\t{bot_resp}\n")
|