NDPSX / app.py
FrostIce's picture
Update app.py
bc7f528 verified
raw
history blame
444 Bytes
import gradio as gr
from transformers import AutoTokenizer
token1=AutoTokenizer.from_pretrained("allenai/Llama-3.1-Tulu-3-8B", use_fast=True)
token2=AutoTokenizer.from_pretrained("burgasdotpro/Sebushka-llama-3.1-8B", use_fast=True)
def ndps(text):
input_ids = token1.encode(text, add_special_tokens=True)
return token2.decode(input_ids, skip_special_tokens=True)
demo = gr.Interface(fn=ndps, inputs="text", outputs="text")
demo.launch()