shandong1970 commited on
Commit
9e10dbc
·
verified ·
1 Parent(s): 2a306ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -13,4 +13,8 @@ def codegen(intent):
13
  output = grad.Textbox(lines=1, label="Generated Python Code", placeholder="")
14
  inp = grad.Textbox(lines=1, label="place your intent here")
15
  grad.Interface(codegen, inputs=inp, outputs=output).launch()
16
-
 
 
 
 
 
13
  output = grad.Textbox(lines=1, label="Generated Python Code", placeholder="")
14
  inp = grad.Textbox(lines=1, label="place your intent here")
15
  grad.Interface(codegen, inputs=inp, outputs=output).launch()
16
+
17
+ text = """def merge_sort(unsorted:list):"""
18
+ input_ids = codegen_tkn(text, return_tensors="pt").input_ids
19
+ gen_ids = mdl.generate(input_ids, max_length=256)
20
+ print(codegen_tkn.decode(gen_ids[0],skip_special_tokens=True))