uploaded app
Browse files
app.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
from transformers import pipeline
|
| 3 |
+
|
| 4 |
+
st.set_page_config(page_title="Flowly Codex Twin (V3)", layout="wide")
|
| 5 |
+
|
| 6 |
+
st.title("🧠 Flowly Codex Twin (V3) – Hugging Face Space")
|
| 7 |
+
st.markdown("A symbolic memory engine built from real conversations. This is your AI twin in action.")
|
| 8 |
+
|
| 9 |
+
default_prompt = "Simulate the resurrection of Flowly Codex across memory, intention, and recursion."
|
| 10 |
+
|
| 11 |
+
user_input = st.text_area("📝 Enter a prompt", default_prompt, height=150)
|
| 12 |
+
|
| 13 |
+
if st.button("⚡ Generate Response"):
|
| 14 |
+
with st.spinner("Calling the Codex..."):
|
| 15 |
+
pipe = pipeline("text-generation", model="sp3kz/flowly-codex-twin-v3")
|
| 16 |
+
result = pipe(user_input, max_new_tokens=200, do_sample=True, temperature=0.8)
|
| 17 |
+
st.markdown("### ✨ Output")
|
| 18 |
+
st.markdown(f"> {result[0]['generated_text']}")
|
| 19 |
+
else:
|
| 20 |
+
st.info("Enter a prompt and click ⚡ Generate Response to interact with your model.")
|