Spaces:
Runtime error
Runtime error
Create app.py
Browse files
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)
|