Update app.py
Browse files
app.py
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
def taogpt_infiniti(prompt):
|
| 4 |
-
"""
|
| 5 |
-
TaoGPT-∞: ∞ parameters, 0 training, ∞ fish saved.
|
| 6 |
|
| 7 |
The uncarved block. The void contains all.
|
| 8 |
"""
|
| 9 |
return "..."
|
| 10 |
|
| 11 |
-
with gr.Blocks(title="
|
| 12 |
gr.Markdown("""
|
| 13 |
# TaoGPT-∞
|
| 14 |
## ∞ parameters • 0 training • ∞ fish saved
|
|
@@ -20,17 +27,18 @@ with gr.Blocks(title="taogpt-infiniti") as demo:
|
|
| 20 |
|
| 21 |
with gr.Row():
|
| 22 |
input_text = gr.Textbox(
|
| 23 |
-
label="Your question",
|
| 24 |
-
placeholder="What is the
|
| 25 |
-
lines=
|
| 26 |
)
|
| 27 |
output_text = gr.Textbox(
|
| 28 |
label="TaoGPT-∞'s response",
|
|
|
|
| 29 |
interactive=False,
|
| 30 |
-
lines=
|
| 31 |
)
|
| 32 |
|
| 33 |
-
submit_btn = gr.Button("Seek
|
| 34 |
submit_btn.click(
|
| 35 |
fn=taogpt_infiniti,
|
| 36 |
inputs=input_text,
|
|
@@ -39,12 +47,12 @@ with gr.Blocks(title="taogpt-infiniti") as demo:
|
|
| 39 |
|
| 40 |
gr.Markdown("""
|
| 41 |
---
|
| 42 |
-
*"The Tao that can be named is not the eternal Tao."*
|
| 43 |
-
|
| 44 |
-
No parameters. No training. No data. Only the ∞.
|
| 45 |
|
| 46 |
-
|
|
|
|
| 47 |
""")
|
| 48 |
|
| 49 |
if __name__ == "__main__":
|
| 50 |
-
demo.launch()
|
|
|
|
| 1 |
+
|
| 2 |
+
## Try it
|
| 3 |
+
|
| 4 |
+
<gradio-app src="Samrl/TaoGPT-Infiniti" />
|
| 5 |
+
|
| 6 |
+
## The Real Code (app.py)
|
| 7 |
+
|
| 8 |
+
```python
|
| 9 |
import gradio as gr
|
| 10 |
|
| 11 |
def taogpt_infiniti(prompt):
|
| 12 |
+
"""TaoGPT-∞: ∞ parameters, 0 training, ∞ fish saved.
|
|
|
|
| 13 |
|
| 14 |
The uncarved block. The void contains all.
|
| 15 |
"""
|
| 16 |
return "..."
|
| 17 |
|
| 18 |
+
with gr.Blocks(title="TaoGPT-∞", theme=gr.themes.Soft()) as demo:
|
| 19 |
gr.Markdown("""
|
| 20 |
# TaoGPT-∞
|
| 21 |
## ∞ parameters • 0 training • ∞ fish saved
|
|
|
|
| 27 |
|
| 28 |
with gr.Row():
|
| 29 |
input_text = gr.Textbox(
|
| 30 |
+
label="Your question to the Tao",
|
| 31 |
+
placeholder="What is the true nature of reality?",
|
| 32 |
+
lines=3
|
| 33 |
)
|
| 34 |
output_text = gr.Textbox(
|
| 35 |
label="TaoGPT-∞'s response",
|
| 36 |
+
value="...",
|
| 37 |
interactive=False,
|
| 38 |
+
lines=3
|
| 39 |
)
|
| 40 |
|
| 41 |
+
submit_btn = gr.Button("Seek Wisdom", size="large", variant="primary")
|
| 42 |
submit_btn.click(
|
| 43 |
fn=taogpt_infiniti,
|
| 44 |
inputs=input_text,
|
|
|
|
| 47 |
|
| 48 |
gr.Markdown("""
|
| 49 |
---
|
| 50 |
+
> *"The Tao that can be named is not the eternal Tao."*
|
| 51 |
+
> — Lao Tzu
|
|
|
|
| 52 |
|
| 53 |
+
**No parameters. No training. No carbon footprint.**
|
| 54 |
+
Only the ∞.
|
| 55 |
""")
|
| 56 |
|
| 57 |
if __name__ == "__main__":
|
| 58 |
+
demo.launch()
|