Spaces:
Sleeping
Sleeping
File size: 570 Bytes
00413f9 1e426ba 00413f9 225d2d6 494f3fd 225d2d6 494f3fd 225d2d6 00413f9 494f3fd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import gradio as gr
from huggingface_hub import InferenceClient
client = InferenceClient("Intercept-Intelligence/Txt-Analyst-AI")
def classify(text):
result = client.text_classification(text)
return result[0]["label"]
demo = gr.Interface(
fn=classify,
inputs=gr.Textbox(label="Text to Analyze", placeholder="Enter text here..."),
outputs=gr.Textbox(label="Classification Result"),
title="Txt Analyst AI",
description="Enter any text and let Intercept's AI classify it based on its training."
)
if __name__ == "__main__":
demo.launch() |