File size: 1,202 Bytes
703bf01
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d316e6d
703bf01
15b8afd
 
 
 
 
 
 
 
 
703bf01
80c77a7
703bf01
d316e6d
703bf01
 
 
 
 
 
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
38
39
40
41
42
43
import gradio as gr
from modules.m_parser import Parser

execute = Parser()
iface = gr.Blocks(css='css/style.css')

with iface:
    gr.HTML("<center><h5>🇺🇸 🇬🇧 Verb Tense Converter</h5></center>")
    with gr.Row():
        input_verb = gr.Textbox(
            label = "1. Enter a verb",
            max_lines=1,
            placeholder = "Enter here a single verb in any tense...",
        )
        btn_get = gr.Button(
            value = "2. Click here to convert!"
        )

    with gr.Row():
        error = gr.HTML() 
    
    with gr.Row(variant='panel'):
        output = gr.Markdown()

    with gr.Row():
        gr.HTML("""
        <center>
        <div class="alert alert-light" role="status">
            CLARIFICATION: Note that when it comes to returning the correct inflection, different types of problems can arise. The library in charge of performing such conversions is based on the third-party dataset AGID, which it does not maintain.
            </div>
        </center>
        """)

    btn_get.click(
        fn = execute.get,
        inputs = input_verb,
        outputs = [error, output],
        api_name="get"
    )

iface.launch(
    server_name = "0.0.0.0"
)