File size: 483 Bytes
3112b9d
6166621
9856e4d
3112b9d
6166621
9856e4d
3112b9d
6166621
3112b9d
 
 
 
 
de6ffe5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import gradio as gr
from transformers import pipeline

# Load the model
pipe = pipeline("text-classification", model="Hello-SimpleAI/chatgpt-detector-roberta-chinese")

def classify_text(text):
    results = pipe(text)
    return results

# Create Gradio interface
iface = gr.Interface(fn=classify_text, inputs="text", outputs="json", title="Text Classification", description="Classify text using the Hello-SimpleAI/chatgpt-detector-roberta-chinese model")

iface.launch(share=True)