Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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")
|
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()
|