Spaces:
Sleeping
Sleeping
changed it into gpt2 model based
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM
|
2 |
import gradio as gr
|
3 |
|
4 |
-
model_id = "gpt2
|
5 |
|
6 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
7 |
model = AutoModelForCausalLM.from_pretrained(model_id)
|
@@ -17,5 +17,5 @@ gr.Interface(
|
|
17 |
["text",gr.Slider(minimum=0, maximum=50, step=1,label="Top_k"),gr.Slider(minimum=0.1, maximum=1.0,label="penalty_alpha")],
|
18 |
"text",
|
19 |
title= "Arun's GPT chatbot",
|
20 |
-
description = "This is Arun's experimental GPT interface exposing gpt2
|
21 |
).launch()
|
|
|
1 |
from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM
|
2 |
import gradio as gr
|
3 |
|
4 |
+
model_id = "gpt2"
|
5 |
|
6 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
7 |
model = AutoModelForCausalLM.from_pretrained(model_id)
|
|
|
17 |
["text",gr.Slider(minimum=0, maximum=50, step=1,label="Top_k"),gr.Slider(minimum=0.1, maximum=1.0,label="penalty_alpha")],
|
18 |
"text",
|
19 |
title= "Arun's GPT chatbot",
|
20 |
+
description = "This is Arun's experimental GPT interface exposing gpt2, feel free to experiment"
|
21 |
).launch()
|