HelloWorld / app.py
Pouyae's picture
Revert "feat: Use Phi-4-mini-instruct"
f433ac9
raw
history blame
378 Bytes
import gradio as gr
from transformers import pipeline
generator = pipeline("text-generation", model="microsoft/phi-4-reasoning-plus", device_map="auto")
def chat_with_phi(prompt):
response = generator(prompt, max_new_tokens=200, do_sample=False)[0]["generated_text"]
return response
demo = gr.Interface(fn=chat_with_phi, inputs="text", outputs="text")
demo.launch()