bvishnu123 commited on
Commit
3dede03
1 Parent(s): 92d606f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -10,8 +10,13 @@ def process_input(title, description):
10
  model = DistilBERTBaseModel(safetensors_path)
11
 
12
  result = model(title, description)
 
 
 
 
 
13
 
14
- return result
15
 
16
  def main():
17
  # Define the interface
@@ -19,8 +24,8 @@ def main():
19
  fn=process_input, # the function to process input
20
  inputs=[gr.Textbox(label="Title"), gr.Textbox(label="Description", lines=4)], # input fields
21
  outputs=gr.Textbox(label="Output"), # output field
22
- title="Simple Gradio App",
23
- description="This is a simple Gradio app that concatenates title and description."
24
  )
25
 
26
  # Launch the interface
 
10
  model = DistilBERTBaseModel(safetensors_path)
11
 
12
  result = model(title, description)
13
+ verdict = ""
14
+ if (result):
15
+ verdict = "This job advertisement is likely fraudulent!"
16
+ else:
17
+ verdict = "This job advertisement is unlikely to be fraudulent."
18
 
19
+ return verdict
20
 
21
  def main():
22
  # Define the interface
 
24
  fn=process_input, # the function to process input
25
  inputs=[gr.Textbox(label="Title"), gr.Textbox(label="Description", lines=4)], # input fields
26
  outputs=gr.Textbox(label="Output"), # output field
27
+ title="Fraudulent Job Advertisement Detection",
28
+ description="This model aims to detect fraudulent job advertisements given their title and desscription for COMP6713: NLP project"
29
  )
30
 
31
  # Launch the interface