Summarization / app.py
abdulsamad's picture
Update app.py
c9de3a1 verified
raw
history blame
891 Bytes
from transformers import pipeline
import torch
#translator = pipeline(task="translation",
# model="./models/facebook/nllb-200-distilled-600M",
# torch_dtype=torch.bfloat16) #
#text = """\
#My puppy is adorable, \
#Your kitten is cute.
#Her panda is friendly.
#His llama is thoughtful. \
#We all have nice pets!"""
#text_translated = translator(text,
# src_lang="eng_Latn",
# tgt_lang="fra_Latn")#
#
#text_translated
import gradio as gr
# Your string variable (replace with your actual content)
text = "Hello, Gradio!"
input_text = gr.inputs.Textbox(lines=5, label="Enter Text:")
# Create a Gradio interface with a label
label = gr.Label(text)
# Launch the Gradio app
interface = gr.Interface(fn =None ,inputs=None, outputs=label, title="String Display Example")
interface.launch()