Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,16 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
|
| 3 |
-
def
|
| 4 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
-
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 7 |
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from model import get_response
|
| 3 |
|
| 4 |
+
def predict(input_text):
|
| 5 |
+
return get_response(input_text)
|
| 6 |
+
|
| 7 |
+
with gr.Blocks() as demo:
|
| 8 |
+
gr.Markdown("# 🧙♂️ AstroAlchemy - BaZi Oracle\nEnter your BaZi chart details for personalized guidance.")
|
| 9 |
+
|
| 10 |
+
input_text = gr.Textbox(lines=10, label="📜 BaZi Chart Input (Structured)")
|
| 11 |
+
output_text = gr.Textbox(lines=10, label="🧭 Oracle Response")
|
| 12 |
+
|
| 13 |
+
submit = gr.Button("🔮 Get Guidance")
|
| 14 |
+
submit.click(fn=predict, inputs=[input_text], outputs=[output_text])
|
| 15 |
|
|
|
|
| 16 |
demo.launch()
|