Spaces:
Sleeping
Sleeping
File size: 547 Bytes
96b6887 41bc2ba 96b6887 41bc2ba 96b6887 41bc2ba 96b6887 41bc2ba |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import gradio as gr
from rag_engine import NewsLegalAnalyzer
analyzer = NewsLegalAnalyzer()
analyzer.initialize()
def analyze_news(news):
if len(news) < 50:
return "Berita terlalu pendek."
return analyzer.analyze(news)
demo = gr.Interface(
fn=analyze_news,
inputs=gr.Textbox(label="Masukkan Berita", lines=10),
outputs=gr.Textbox(label="Hasil Analisis", lines=20),
title="AI RAG Hukum – Qwen + Gemini",
description="Masukkan berita dan sistem RAG akan mencari pasal hukum paling relevan."
)
demo.launch()
|