Spaces:
Runtime error
Runtime error
aliasgarov
commited on
Commit
·
fd45959
1
Parent(s):
d3fb13e
Updated models
Browse files
app.py
CHANGED
|
@@ -193,7 +193,7 @@ def predict_mc(model, tokenizer, text):
|
|
| 193 |
return mc_score
|
| 194 |
|
| 195 |
|
| 196 |
-
def ai_generated_test(input
|
| 197 |
|
| 198 |
cleaned_text = remove_special_characters(input)
|
| 199 |
bc_score = predict_bc(text_bc_model, text_bc_tokenizer, cleaned_text)
|
|
@@ -209,7 +209,7 @@ def ai_generated_test(input, models):
|
|
| 209 |
# COMBINED
|
| 210 |
def main(
|
| 211 |
input,
|
| 212 |
-
models,
|
| 213 |
year_from,
|
| 214 |
month_from,
|
| 215 |
day_from,
|
|
@@ -218,7 +218,7 @@ def main(
|
|
| 218 |
day_to,
|
| 219 |
domains_to_skip,
|
| 220 |
):
|
| 221 |
-
bc_score, mc_score = ai_generated_test(input
|
| 222 |
formatted_tokens = plagiarism_check(
|
| 223 |
input,
|
| 224 |
year_from,
|
|
@@ -287,12 +287,12 @@ with gr.Blocks() as demo:
|
|
| 287 |
"""
|
| 288 |
)
|
| 289 |
|
| 290 |
-
models = gr.Dropdown(
|
| 291 |
-
model_list,
|
| 292 |
-
value=model_list,
|
| 293 |
-
multiselect=True,
|
| 294 |
-
label="Models to test against",
|
| 295 |
-
)
|
| 296 |
|
| 297 |
with gr.Row():
|
| 298 |
with gr.Column():
|
|
@@ -345,7 +345,7 @@ with gr.Blocks() as demo:
|
|
| 345 |
fn=main,
|
| 346 |
inputs=[
|
| 347 |
input_text,
|
| 348 |
-
models,
|
| 349 |
year_from,
|
| 350 |
month_from,
|
| 351 |
day_from,
|
|
@@ -364,7 +364,7 @@ with gr.Blocks() as demo:
|
|
| 364 |
|
| 365 |
only_ai_btn.click(
|
| 366 |
fn=ai_generated_test,
|
| 367 |
-
inputs=[input_text
|
| 368 |
outputs=[
|
| 369 |
bcLabel,
|
| 370 |
mcLabel,
|
|
|
|
| 193 |
return mc_score
|
| 194 |
|
| 195 |
|
| 196 |
+
def ai_generated_test(input):
|
| 197 |
|
| 198 |
cleaned_text = remove_special_characters(input)
|
| 199 |
bc_score = predict_bc(text_bc_model, text_bc_tokenizer, cleaned_text)
|
|
|
|
| 209 |
# COMBINED
|
| 210 |
def main(
|
| 211 |
input,
|
| 212 |
+
# models,
|
| 213 |
year_from,
|
| 214 |
month_from,
|
| 215 |
day_from,
|
|
|
|
| 218 |
day_to,
|
| 219 |
domains_to_skip,
|
| 220 |
):
|
| 221 |
+
bc_score, mc_score = ai_generated_test(input)
|
| 222 |
formatted_tokens = plagiarism_check(
|
| 223 |
input,
|
| 224 |
year_from,
|
|
|
|
| 287 |
"""
|
| 288 |
)
|
| 289 |
|
| 290 |
+
# models = gr.Dropdown(
|
| 291 |
+
# model_list,
|
| 292 |
+
# value=model_list,
|
| 293 |
+
# multiselect=True,
|
| 294 |
+
# label="Models to test against",
|
| 295 |
+
# )
|
| 296 |
|
| 297 |
with gr.Row():
|
| 298 |
with gr.Column():
|
|
|
|
| 345 |
fn=main,
|
| 346 |
inputs=[
|
| 347 |
input_text,
|
| 348 |
+
# models,
|
| 349 |
year_from,
|
| 350 |
month_from,
|
| 351 |
day_from,
|
|
|
|
| 364 |
|
| 365 |
only_ai_btn.click(
|
| 366 |
fn=ai_generated_test,
|
| 367 |
+
inputs=[input_text],
|
| 368 |
outputs=[
|
| 369 |
bcLabel,
|
| 370 |
mcLabel,
|