morinousagi commited on
Commit
5161c41
·
verified ·
1 Parent(s): 3fa478b

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -12
app.py CHANGED
@@ -38,26 +38,29 @@ def analyze_text(text):
38
  return "\n".join(formatted_output)
39
 
40
 
41
- demo = gr.Interface(
42
- fn=analyze_text,
43
 
44
- inputs=gr.Textbox(
 
 
 
 
 
 
45
  lines=12,
46
  label="Intelligence Report Input",
47
  placeholder="Paste intelligence-style narrative text here..."
48
- ),
49
 
50
- outputs=gr.Markdown(),
51
 
52
- title="SIGMA: Structured Intelligence & Grounded Meaning Analyzer",
53
 
54
- description=(
55
- "SIGMA extracts explicit facts, evaluates implicit inferences "
56
- "using Natural Language Inference (MNLI), and generates "
57
- "concise intelligence-style summaries using pretrained NLP models."
58
  )
59
- )
60
-
61
 
62
  if __name__ == "__main__":
63
  demo.launch()
 
38
  return "\n".join(formatted_output)
39
 
40
 
41
+ with gr.Blocks() as demo:
 
42
 
43
+ gr.Markdown("# SIGMA: Structured Intelligence & Grounded Meaning Analyzer")
44
+ gr.Markdown(
45
+ "Extract explicit facts, evaluate implicit inferences, "
46
+ "and generate intelligence-style summaries."
47
+ )
48
+
49
+ input_text = gr.Textbox(
50
  lines=12,
51
  label="Intelligence Report Input",
52
  placeholder="Paste intelligence-style narrative text here..."
53
+ )
54
 
55
+ submit_btn = gr.Button("Analyze")
56
 
57
+ output_text = gr.Markdown()
58
 
59
+ submit_btn.click(
60
+ fn=analyze_text,
61
+ inputs=input_text,
62
+ outputs=output_text
63
  )
 
 
64
 
65
  if __name__ == "__main__":
66
  demo.launch()