rationalsolver's picture
Update app.py
8903b7b verified
raw
history blame contribute delete
401 Bytes
# Load the model pipeline
detector = pipeline("text-classification", model="openai-community/roberta-large-openai-detector")
# Define a function for detection
def detect_ai_content(text):
result = detector(text)
return result
# Create a Gradio interface
iface = gr.Interface(
fn=detect_ai_content,
inputs="text",
outputs="json",
title="AI Content Detector"
)
iface.launch()