Pendrokar commited on
Commit
207d7a5
·
verified ·
1 Parent(s): ed509a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -2
app.py CHANGED
@@ -28,5 +28,32 @@ def parse(lojban):
28
 
29
  return text
30
 
31
- demo = gr.Interface(fn=parse, inputs="text", outputs="text")
32
- demo.launch(show_api=True, show_error=True, mcp_server=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
 
29
  return text
30
 
31
+ default_input = "coi rodo"
32
+
33
+ input_textbox = gr.Textbox(
34
+ label="Lojban Text",
35
+ #info="ignores: emojis, emoticons, numbers, URLs",
36
+ lines=3,
37
+ value=default_input,
38
+ autofocus=True
39
+ )
40
+
41
+ gradio_app = gr.Interface(
42
+ parse,
43
+ [
44
+ input_textbox,
45
+ ],
46
+ outputs=gr.Label(
47
+ label="Parse Tree",
48
+ # could not auto select example output
49
+ value=""
50
+ ),
51
+ examples=[
52
+ ["coi rodo"],
53
+ ],
54
+ cache_examples=True,
55
+ live=True,
56
+ title="Lojban Parser",
57
+ )
58
+
59
+ gradio_app.launch(show_api=True, show_error=True, mcp_server=True)