AhmedSSoliman commited on
Commit
cfab1d9
1 Parent(s): c76754b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -15,8 +15,14 @@ def generate_code(NL):
15
  output_code = tokenizer.decode(outputs[0], skip_special_tokens=True)
16
  return output_code
17
 
18
-
19
- iface = gr.Interface(fn=generate_code, inputs="text", outputs="text")
 
 
 
 
 
 
20
  iface.launch()
21
  #iface.launch(share=True)
22
 
 
15
  output_code = tokenizer.decode(outputs[0], skip_special_tokens=True)
16
  return output_code
17
 
18
+ iface = gr.Interface(fn=generate_code, inputs="text", outputs="text",
19
+ examples=[["create array containing the maximum value of respective elements of array `[2, 3, 4]` and array `[1, 5, 2]"],
20
+ ["check if all elements in list `mylist` are identical"],
21
+ ["enable debug mode on flask application `app`"],
22
+ ["getting the length of `my_tuple`"],
23
+ ['find all files in directory "/mydir" with extension ".txt"']],
24
+ title="MarianCG: A Code Generation Transformer Model Inspired by Machine Translation",
25
+ description="This is a code generation model which can generate code from the natural language description")
26
  iface.launch()
27
  #iface.launch(share=True)
28