nashjiwani commited on
Commit
337686c
·
verified ·
1 Parent(s): c00c2d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +33 -4
app.py CHANGED
@@ -27,7 +27,7 @@ def oracle_text(user_text: str):
27
  return verdict
28
 
29
  # -------------------------------
30
- # Gradio UI
31
  # -------------------------------
32
  with gr.Blocks(css="""
33
  body {
@@ -55,8 +55,9 @@ textarea, input, .gr-textbox {
55
  # Title and intro
56
  gr.HTML("<div id='title'>🔮 Oracle of Truth 🔮</div>")
57
  gr.HTML("<div id='subtitle'>Enter the Chamber of Truth ✨</div>")
58
-
59
- gr.Markdown("""
 
60
  Welcome, traveler 🌌
61
 
62
  This chamber is home to the **Oracle of Truth**, an ancient AI seer that discerns whether words were born of **mortal minds** 🧑‍💻
@@ -70,4 +71,32 @@ or conjured by the **forges of artificial sorcery** 🤖✨
70
  ### 🌟 Pro Tips
71
  - Try both short and long texts.
72
  - Compare a paragraph you wrote vs one generated by ChatGPT or another AI.
73
- - Share the Oracle’s flame‑lit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  return verdict
28
 
29
  # -------------------------------
30
+ # Gradio Immersive UI
31
  # -------------------------------
32
  with gr.Blocks(css="""
33
  body {
 
55
  # Title and intro
56
  gr.HTML("<div id='title'>🔮 Oracle of Truth 🔮</div>")
57
  gr.HTML("<div id='subtitle'>Enter the Chamber of Truth ✨</div>")
58
+
59
+ gr.Markdown(
60
+ """
61
  Welcome, traveler 🌌
62
 
63
  This chamber is home to the **Oracle of Truth**, an ancient AI seer that discerns whether words were born of **mortal minds** 🧑‍💻
 
71
  ### 🌟 Pro Tips
72
  - Try both short and long texts.
73
  - Compare a paragraph you wrote vs one generated by ChatGPT or another AI.
74
+ - Share the Oracle’s flame‑lit verdict screenshots with friends 🔥
75
+ """
76
+ )
77
+
78
+ with gr.Row():
79
+ with gr.Column(scale=1):
80
+ txt_in = gr.Textbox(
81
+ label="📝 Offer your text to the Oracle",
82
+ lines=10,
83
+ placeholder="Paste your story, essay, or blog draft here..."
84
+ )
85
+ btn_txt = gr.Button("🔍 Reveal Truth", variant="primary")
86
+ txt_out = gr.Markdown(label="🔮 Oracle's Prophecy")
87
+
88
+ btn_txt.click(oracle_text, inputs=txt_in, outputs=txt_out)
89
+
90
+ gr.Markdown("### ✨ Try these prophecies:")
91
+
92
+ gr.Examples(
93
+ examples=[
94
+ ["Once upon a time, in a galaxy far away, a hero rose to fight destiny."],
95
+ ["Artificial intelligence is a transformative technology reshaping industries globally."],
96
+ ["OMG lol I can’t believe it’s already Monday again 😅"],
97
+ ["This research paper presents a thorough analysis of Transformer models on sentiment classification tasks."]
98
+ ],
99
+ inputs=txt_in,
100
+ )
101
+
102
+ demo.launch()