dl-project2 / app.py
jannatulferdaws's picture
train the model
3cff8f8 verified
raw
history blame contribute delete
263 Bytes
import gradio as gr
from transformers import pipeline
pipe = pipeline("translation", model="my_model.keras")
def predict(text):
return pipe(text)[0]["translation_text"]
demo = gr.Interface(
fn=predict,
inputs='text',
outputs='text',
)
demo.launch()