rica commited on
Commit
da54da6
1 Parent(s): c36abdf

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+
4
+ pipe = pipeline(task="text-classification",
5
+ # model that can do 22k-category classification
6
+ model="mrm8488/codebert-base-finetuned-detect-insecure-code")
7
+ gr.Interface.from_pipeline(pipe,
8
+ title="Insecure Code Detector",
9
+ description="Label 1 for insecure code",
10
+ allow_flagging="never").launch(inbrowser=True)