Spaces:
Running
Running
abdiharyadi
commited on
Commit
β’
991fc8d
1
Parent(s):
cb5c6f6
fix: flip graph encode and graph decode
Browse files
app.py
CHANGED
@@ -2,8 +2,8 @@ import gradio as gr
|
|
2 |
import penman
|
3 |
|
4 |
def run(text, source_style):
|
5 |
-
source_amr = penman.
|
6 |
-
source_amr_display = penman.
|
7 |
yield source_amr_display, "...", "...", "...", "..."
|
8 |
|
9 |
triplets = [
|
@@ -17,8 +17,8 @@ def run(text, source_style):
|
|
17 |
style_words_display = ", ".join(style_words)
|
18 |
yield source_amr_display, triplets_display, style_words_display, "...", "..."
|
19 |
|
20 |
-
target_amr = penman.
|
21 |
-
target_amr_display = penman.
|
22 |
yield source_amr_display, triplets_display, style_words_display, target_amr_display, "..."
|
23 |
|
24 |
result = f"dunia ({text=}, {source_style=})"
|
|
|
2 |
import penman
|
3 |
|
4 |
def run(text, source_style):
|
5 |
+
source_amr = penman.decode("(z0 / halo)")
|
6 |
+
source_amr_display = penman.encode(source_amr)
|
7 |
yield source_amr_display, "...", "...", "...", "..."
|
8 |
|
9 |
triplets = [
|
|
|
17 |
style_words_display = ", ".join(style_words)
|
18 |
yield source_amr_display, triplets_display, style_words_display, "...", "..."
|
19 |
|
20 |
+
target_amr = penman.decode("(z0 / dunia)")
|
21 |
+
target_amr_display = penman.encode(target_amr)
|
22 |
yield source_amr_display, triplets_display, style_words_display, target_amr_display, "..."
|
23 |
|
24 |
result = f"dunia ({text=}, {source_style=})"
|