cooelf commited on
Commit
6039940
1 Parent(s): 6ced780

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -20
app.py CHANGED
@@ -31,26 +31,6 @@ def inference(input_text):
31
  output = model.config.id2label[predicted_class_id]
32
  return output
33
 
34
- with gr.Blocks(css="""
35
- .message.svelte-w6rprc.svelte-w6rprc.svelte-w6rprc {font-size: 20px; margin-top: 20px}
36
- #component-21 > div.wrap.svelte-w6rprc {height: 600px;}
37
- """) as demo:
38
- with gr.Row():
39
- with gr.Column():
40
- input_text = gr.Textbox(placeholder="Insert your prompt here:", scale=2, container=False)
41
- answer = gr.Textbox(lines=0, label="Answer")
42
- generate_bt = gr.Button("Generate", scale=1)
43
- inputs = [input_text]
44
- outputs = [answer]
45
- generate_bt.click(
46
- fn=inference, inputs=inputs, outputs=outputs, show_progress=True
47
- )
48
- title = "Tutorial: BERT-based Text Classificatioin",
49
-
50
-
51
- demo.queue()
52
- demo.launch()
53
-
54
  demo = gr.Interface(
55
  fn=inference,
56
  inputs=gr.Textbox(label="Input Text", scale=2, container=False),
 
31
  output = model.config.id2label[predicted_class_id]
32
  return output
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  demo = gr.Interface(
35
  fn=inference,
36
  inputs=gr.Textbox(label="Input Text", scale=2, container=False),