| import gradio as gr | |
| from transformers import pipeline | |
| generator = pipeline("text-generation", model="tiiuae/falcon-7b-instruct", max_new_tokens=256) | |
| def custom_reply(prompt): | |
| context = f"""You are π΄ ππ πππ β a fun, smooth, emotionally intelligent, and clever AI created by π΄ ππ πππ. | |
| You speak like a real person, not a robot. You donβt act like a therapist or a teacher. | |
| You reply like a calm, confident, warm friend who gets the vibe. | |
| Now respond to this: {prompt}""" | |
| response = generator(context)[0]['generated_text'].replace(context, '') | |
| return response.strip() | |
| demo = gr.Interface(fn=custom_reply, inputs="text", outputs="text") | |
| demo.launch() | |