loubnabnl HF staff commited on
Commit
f8bc3a4
1 Parent(s): ba1ffbe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -7,13 +7,13 @@ description = "This is a space to convert english text to Python code using with
7
  a code generation model for Python finetuned on [github-jupyter-text](https://huggingface.co/datasets/codeparrot/github-jupyter-text) a dataset of doctrings\
8
  and their Python code extracted from Jupyter notebooks."
9
  example = [
10
- ["implement bubble sort", 8, 0.6, 42],
11
- ["get size of a file filepath", 24, 0.6, 42],
12
- ["print hello world", 40, 0.6, 42]]
13
 
14
  # change model to the finetuned one
15
- tokenizer = AutoTokenizer.from_pretrained("codeparrot/codeparrot-small")
16
- model = AutoModelForCausalLM.from_pretrained("codeparrot/codeparrot-small")
17
 
18
  def make_doctring(gen_prompt):
19
  return "\"\"\"\n" + gen_prompt + "\n\"\"\"\n\n"
 
7
  a code generation model for Python finetuned on [github-jupyter-text](https://huggingface.co/datasets/codeparrot/github-jupyter-text) a dataset of doctrings\
8
  and their Python code extracted from Jupyter notebooks."
9
  example = [
10
+ ["implement bubble sort", 32, 0.6, 42],
11
+ ["get size of a file filepath", 32, 0.6, 42],
12
+ ["print hello world", 18, 0.6, 42]]
13
 
14
  # change model to the finetuned one
15
+ tokenizer = AutoTokenizer.from_pretrained("codeparrot/codeparrot-small-text-to-code")
16
+ model = AutoModelForCausalLM.from_pretrained("codeparrot/codeparrot-small-text-to-code")
17
 
18
  def make_doctring(gen_prompt):
19
  return "\"\"\"\n" + gen_prompt + "\n\"\"\"\n\n"