abdiharyadi commited on
Commit
991fc8d
β€’
1 Parent(s): cb5c6f6

fix: flip graph encode and graph decode

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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.encode("(z0 / halo)")
6
- source_amr_display = penman.decode(source_amr)
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.encode("(z0 / dunia)")
21
- target_amr_display = penman.decode(target_amr)
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=})"