jbochi commited on
Commit
4e63f26
1 Parent(s): 85b9553

Add examples

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -45,18 +45,21 @@ def run():
45
  label="Max length",
46
  ),
47
  ]
 
 
 
 
48
  outputs = gr.components.JSON()
49
  title = f"{MODEL_NAME} demo"
50
  demo_status = "Demo is running on CPU"
51
- description = (
52
- f"Details: https://huggingface.co/{MODEL_NAME}. {demo_status}"
53
- )
54
  gr.Interface(
55
  inference,
56
  inputs,
57
  outputs,
58
  title=title,
59
  description=description,
 
60
  ).launch()
61
 
62
 
 
45
  label="Max length",
46
  ),
47
  ]
48
+ examples = [
49
+ ["I'm a madlad!", "es", 50],
50
+ ["千里之行,始於足下", "en", 50],
51
+ ]
52
  outputs = gr.components.JSON()
53
  title = f"{MODEL_NAME} demo"
54
  demo_status = "Demo is running on CPU"
55
+ description = f"Details: https://huggingface.co/{MODEL_NAME}. {demo_status}"
 
 
56
  gr.Interface(
57
  inference,
58
  inputs,
59
  outputs,
60
  title=title,
61
  description=description,
62
+ examples=examples,
63
  ).launch()
64
 
65