Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -17,9 +17,21 @@ def similarity(input):
|
|
17 |
top_row = sorted_df.loc[0]
|
18 |
return sorted_df.iloc[0][["text", "similarities"]]
|
19 |
|
20 |
-
input_text = gr.inputs.Textbox(label="
|
|
|
|
|
21 |
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
-
|
|
|
|
|
|
17 |
top_row = sorted_df.loc[0]
|
18 |
return sorted_df.iloc[0][["text", "similarities"]]
|
19 |
|
20 |
+
input_text = gr.inputs.Textbox(label="Enter your text here")
|
21 |
+
text_output = gr.outputs.Textbox(label="Most similar text")
|
22 |
+
similarity_output = gr.outputs.Textbox(label="Similarity score")
|
23 |
|
24 |
+
ui = gr.Interface(fn=similarity,
|
25 |
+
inputs=input_text,
|
26 |
+
outputs=[text_output, similarity_output],
|
27 |
+
title="Semantic Plagiarism Checker",
|
28 |
+
description="Check if your text is semantically similar to pre-existing texts to prevent plagiarism.",
|
29 |
+
theme="compact",
|
30 |
+
layout="vertical",
|
31 |
+
inputs_layout="stacked",
|
32 |
+
outputs_layout="stacked",
|
33 |
+
allow_flagging=False)
|
34 |
|
35 |
+
|
36 |
+
|
37 |
+
ui.launch()
|