myalexa / app.py
almncarlo's picture
Update app.py
f6cc7ad verified
raw
history blame
470 Bytes
import gradio as gr
from transformers import pipeline, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("microsoft/Phi-3-mini-128k-instruct")
pipe = pipeline("text-generation", model="microsoft/Phi-3-mini-128k-instruct", trust_remote_code=True, tokenizer=tokenizer)
gr.Interface.from_pipeline(pipe,
title="TextGen",
description="Using pipeline with Phi3",
).launch(inbrowser=True)