Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import torch
|
2 |
from transformers import AutoTokenizer, AutoModelForCausalLM, AutoConfig
|
3 |
-
modelname="gpt2-
|
4 |
config = AutoConfig.from_pretrained(modelname)
|
5 |
tokenizer = AutoTokenizer.from_pretrained(modelname)
|
6 |
model = AutoModelForCausalLM.from_pretrained(modelname,config=config)
|
@@ -95,7 +95,7 @@ with gr.Blocks() as demo:
|
|
95 |
with gr.Column(scale=0.85):
|
96 |
txt = gr.Textbox(
|
97 |
show_label=False,
|
98 |
-
placeholder="AI always replies with \"that\".",
|
99 |
).style(container=False)
|
100 |
|
101 |
txt.submit(add_text, [chatbot, txt], [chatbot, txt]).then(
|
|
|
1 |
import torch
|
2 |
from transformers import AutoTokenizer, AutoModelForCausalLM, AutoConfig
|
3 |
+
modelname="gpt2-large"
|
4 |
config = AutoConfig.from_pretrained(modelname)
|
5 |
tokenizer = AutoTokenizer.from_pretrained(modelname)
|
6 |
model = AutoModelForCausalLM.from_pretrained(modelname,config=config)
|
|
|
95 |
with gr.Column(scale=0.85):
|
96 |
txt = gr.Textbox(
|
97 |
show_label=False,
|
98 |
+
placeholder="AI always replies with \"that\". It may take more than ten seconds.",
|
99 |
).style(container=False)
|
100 |
|
101 |
txt.submit(add_text, [chatbot, txt], [chatbot, txt]).then(
|