w601sxs commited on
Commit
15e39af
·
1 Parent(s): 6ff98d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -50,7 +50,7 @@ def get_tokens_and_labels(prompt):
50
  """
51
  Given the prompt (text), return a list of tuples (decoded_token, label)
52
  """
53
- inputs = tokenizer([prompt], return_tensors="pt").to("cuda")
54
  outputs = ref_model.generate(
55
  **inputs,
56
  max_new_tokens=1000,
@@ -143,6 +143,7 @@ demo = gr.Interface(
143
  fn=render_output,
144
  inputs='text',
145
  outputs='html',
 
146
  )
147
 
148
  demo.launch()
 
50
  """
51
  Given the prompt (text), return a list of tuples (decoded_token, label)
52
  """
53
+ inputs = tokenizer([prompt], return_tensors="pt")
54
  outputs = ref_model.generate(
55
  **inputs,
56
  max_new_tokens=1000,
 
143
  fn=render_output,
144
  inputs='text',
145
  outputs='html',
146
+ examples=[['context: <As an AI assistant provide helpful, accurate and detailed answers to user questions> question: <Given the fact that Inhaling, or breathing in, increases the size of the chest, which decreases air pressure inside the lungs. If Mona is done with a race and her chest contracts, what happens to the amount of air pressure in her lungs increases or decreases?>']]
147
  )
148
 
149
  demo.launch()