vjain commited on
Commit
c8d4682
1 Parent(s): d62b814

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -4
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="Input Text")
 
 
21
 
22
- text_output = gr.outputs.Textbox(label="Most Similar Text")
23
- similarity_output = gr.outputs.Textbox(label="Cosine Similarity Score")
 
 
 
 
 
 
 
 
24
 
25
- ui = gr.Interface(fn=similarity, inputs="text", outputs=[text_output, similarity_output],title="Semantic Plaigarism Checker", description="Check if input text is semantically similar to prevent plaigarism").launch()
 
 
 
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()