Malek-AI commited on
Commit
0b5e516
·
verified ·
1 Parent(s): 100da0b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -12
app.py CHANGED
@@ -7,19 +7,14 @@ def mask(text):
7
  return output[0]['sequence']
8
 
9
  # Gradio UI
10
- # with gr.Blocks() as ui:
11
- # gr.Markdown("BERT Test - Zircon.tech")
12
- # gr.Button("Predict").click(fn=mask,
13
- # inputs = gr.Textbox(label="Give me a sentance and use the word [MASK] to predict what will go there"),
14
- # outputs = gr.Textbox())
15
- # ui.launch(share=True)
16
-
17
  ui = gr.Interface(
18
  fn=mask,
19
- inputs="textbox",
20
- outputs="textbox",
21
  submit_btn="Predict",
22
- title="BERT Test - Zircon.tech",
23
- description="Testing BERT Model"
 
24
  )
25
- ui.launch(share=True)
 
7
  return output[0]['sequence']
8
 
9
  # Gradio UI
10
+ examples=[['Today I went to [MASK] after I got out of bed.']]
 
 
 
 
 
 
11
  ui = gr.Interface(
12
  fn=mask,
13
+ inputs="text",
14
+ outputs="text",
15
  submit_btn="Predict",
16
+ title="BERT-based Text Analyzer",
17
+ description="Enter some text to analyze with BERT!",
18
+ examples=examples
19
  )
20
+ ui.launch(share=True)