Spaces:
Runtime error
Runtime error
Merge branch 'main' into eljanm
Browse files
app.py
CHANGED
@@ -208,7 +208,7 @@ def predict_mc(model, tokenizer, text):
|
|
208 |
return mc_score
|
209 |
|
210 |
|
211 |
-
def ai_generated_test(input
|
212 |
|
213 |
cleaned_text = remove_special_characters(input)
|
214 |
bc_score = predict_bc(text_bc_model, text_bc_tokenizer, cleaned_text)
|
@@ -224,7 +224,7 @@ def ai_generated_test(input, models):
|
|
224 |
# COMBINED
|
225 |
def main(
|
226 |
input,
|
227 |
-
models,
|
228 |
year_from,
|
229 |
month_from,
|
230 |
day_from,
|
@@ -233,7 +233,7 @@ def main(
|
|
233 |
day_to,
|
234 |
domains_to_skip,
|
235 |
):
|
236 |
-
bc_score, mc_score = ai_generated_test(input
|
237 |
formatted_tokens = plagiarism_check(
|
238 |
input,
|
239 |
year_from,
|
@@ -388,12 +388,12 @@ with gr.Blocks() as demo:
|
|
388 |
"""
|
389 |
)
|
390 |
|
391 |
-
models = gr.Dropdown(
|
392 |
-
model_list,
|
393 |
-
value=model_list,
|
394 |
-
multiselect=True,
|
395 |
-
label="Models to test against",
|
396 |
-
)
|
397 |
|
398 |
with gr.Row():
|
399 |
with gr.Column():
|
@@ -452,7 +452,7 @@ with gr.Blocks() as demo:
|
|
452 |
fn=main,
|
453 |
inputs=[
|
454 |
input_text,
|
455 |
-
models,
|
456 |
year_from,
|
457 |
month_from,
|
458 |
day_from,
|
@@ -471,7 +471,7 @@ with gr.Blocks() as demo:
|
|
471 |
|
472 |
only_ai_btn.click(
|
473 |
fn=ai_generated_test,
|
474 |
-
inputs=[input_text
|
475 |
outputs=[
|
476 |
bcLabel,
|
477 |
mcLabel,
|
|
|
208 |
return mc_score
|
209 |
|
210 |
|
211 |
+
def ai_generated_test(input):
|
212 |
|
213 |
cleaned_text = remove_special_characters(input)
|
214 |
bc_score = predict_bc(text_bc_model, text_bc_tokenizer, cleaned_text)
|
|
|
224 |
# COMBINED
|
225 |
def main(
|
226 |
input,
|
227 |
+
# models,
|
228 |
year_from,
|
229 |
month_from,
|
230 |
day_from,
|
|
|
233 |
day_to,
|
234 |
domains_to_skip,
|
235 |
):
|
236 |
+
bc_score, mc_score = ai_generated_test(input)
|
237 |
formatted_tokens = plagiarism_check(
|
238 |
input,
|
239 |
year_from,
|
|
|
388 |
"""
|
389 |
)
|
390 |
|
391 |
+
# models = gr.Dropdown(
|
392 |
+
# model_list,
|
393 |
+
# value=model_list,
|
394 |
+
# multiselect=True,
|
395 |
+
# label="Models to test against",
|
396 |
+
# )
|
397 |
|
398 |
with gr.Row():
|
399 |
with gr.Column():
|
|
|
452 |
fn=main,
|
453 |
inputs=[
|
454 |
input_text,
|
455 |
+
# models,
|
456 |
year_from,
|
457 |
month_from,
|
458 |
day_from,
|
|
|
471 |
|
472 |
only_ai_btn.click(
|
473 |
fn=ai_generated_test,
|
474 |
+
inputs=[input_text],
|
475 |
outputs=[
|
476 |
bcLabel,
|
477 |
mcLabel,
|