File size: 891 Bytes
eaf7fab
 
 
 
5e777e2
 
 
 
 
 
 
 
 
 
eaf7fab
 
8c527ad
 
 
 
 
eaf7fab
8c527ad
 
4f8aea4
 
 
c9de3a1
 
 
4f8aea4
 
 
 
a0925c8
4f8aea4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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()