Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -28,5 +28,32 @@ def parse(lojban):
|
|
| 28 |
|
| 29 |
return text
|
| 30 |
|
| 31 |
-
|
| 32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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)
|