AlekseyKorshuk's picture
Update app.py
1607e47
raw
history blame
No virus
388 Bytes
import gradio as gr
from transformers import pipeline
import os
token = os.environ.get("HF_TOKEN")
gr.load("models/herzlicemi/37a0-5klk-3rla-0", hf_token=token).launch()
pipe = pipeline("translation", model="herzlicemi/37a0-5klk-3rla-0", token=token)
def predict(text):
return str(pipe(text))
demo = gr.Interface(
fn=predict,
inputs='text',
outputs='text',
)
demo.launch()