Spaces:
Running
on
Zero
Running
on
Zero
da03
commited on
Commit
•
788dc7a
1
Parent(s):
0552781
18 digits
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import gradio as gr
|
|
4 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
5 |
|
6 |
# Load models
|
7 |
-
implicit_cot_model_name = 'yuntian-deng/gpt2-implicit-cot-multiplication'
|
8 |
implicit_cot_model = AutoModelForCausalLM.from_pretrained(implicit_cot_model_name)
|
9 |
tokenizer = AutoTokenizer.from_pretrained(implicit_cot_model_name)
|
10 |
|
@@ -144,8 +144,8 @@ color_map = {"correct": "green", "wrong": "red"}
|
|
144 |
demo = gr.Interface(
|
145 |
fn=predict_product,
|
146 |
inputs=[
|
147 |
-
gr.Textbox(label='First Number (up to
|
148 |
-
gr.Textbox(label='Second Number (up to
|
149 |
],
|
150 |
outputs=[
|
151 |
gr.HighlightedText(label='Ground Truth Product', combine_adjacent=False, show_legend=False, color_map=color_map),
|
|
|
4 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
5 |
|
6 |
# Load models
|
7 |
+
implicit_cot_model_name = 'yuntian-deng/gpt2-implicit-cot-multiplication-18-digits'
|
8 |
implicit_cot_model = AutoModelForCausalLM.from_pretrained(implicit_cot_model_name)
|
9 |
tokenizer = AutoTokenizer.from_pretrained(implicit_cot_model_name)
|
10 |
|
|
|
144 |
demo = gr.Interface(
|
145 |
fn=predict_product,
|
146 |
inputs=[
|
147 |
+
gr.Textbox(label='First Number (up to 18 digits)', value='123456789'),
|
148 |
+
gr.Textbox(label='Second Number (up to 18 digits)', value='987654321'),
|
149 |
],
|
150 |
outputs=[
|
151 |
gr.HighlightedText(label='Ground Truth Product', combine_adjacent=False, show_legend=False, color_map=color_map),
|