stillerman commited on
Commit
e492d50
1 Parent(s): f306f8a

use CPU, ruby default prompt

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -10,7 +10,7 @@ a 1.1B parameter model for code generation in Python, Java & JavaScript. The mod
10
  with the <span style='color: #ff75b3;'>&lt;FILL-HERE&gt;</span> token.</span>"""
11
 
12
  token = os.environ["HUB_TOKEN"]
13
- device="cuda:0"
14
 
15
 
16
  FIM_PREFIX = "<fim-prefix>"
@@ -97,7 +97,12 @@ with demo:
97
  _, colum_2, _ = gr.Column(scale=1), gr.Column(scale=6), gr.Column(scale=1)
98
  with colum_2:
99
  gr.Markdown(value=description)
100
- code = gr.Textbox(lines=5, label="Input code", value="def all_odd_elements(sequence):\n \"\"\"Returns every odd element of the sequence.\"\"\"")
 
 
 
 
 
101
 
102
  with gr.Accordion("Advanced settings", open=False):
103
  max_new_tokens= gr.Slider(
@@ -126,5 +131,5 @@ with demo:
126
  event = run.click(code_generation, [code, max_new_tokens, temperature, seed], output, api_name="predict")
127
  gr.HTML(label="Contact", value="<img src='https://huggingface.co/datasets/bigcode/admin/resolve/main/bigcode_contact.png' alt='contact' style='display: block; margin: auto; max-width: 800px;'>")
128
 
129
- # demo.launch(share=True)
130
  demo.launch()
 
10
  with the <span style='color: #ff75b3;'>&lt;FILL-HERE&gt;</span> token.</span>"""
11
 
12
  token = os.environ["HUB_TOKEN"]
13
+ device="cpu"
14
 
15
 
16
  FIM_PREFIX = "<fim-prefix>"
 
97
  _, colum_2, _ = gr.Column(scale=1), gr.Column(scale=6), gr.Column(scale=1)
98
  with colum_2:
99
  gr.Markdown(value=description)
100
+ code = gr.Textbox(lines=5, label="Input code", value='''def fib(n)
101
+ if n <= 1
102
+ n
103
+ else
104
+ <FILL-HERE>
105
+ end''')
106
 
107
  with gr.Accordion("Advanced settings", open=False):
108
  max_new_tokens= gr.Slider(
 
131
  event = run.click(code_generation, [code, max_new_tokens, temperature, seed], output, api_name="predict")
132
  gr.HTML(label="Contact", value="<img src='https://huggingface.co/datasets/bigcode/admin/resolve/main/bigcode_contact.png' alt='contact' style='display: block; margin: auto; max-width: 800px;'>")
133
 
134
+ #demo.launch(share=True)
135
  demo.launch()