Spaces:
Runtime error
Runtime error
Commit
·
02c09b6
1
Parent(s):
cf8473e
Changed gpt2 to llama
Browse files
app.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
import gradio as gr
|
2 |
-
from transformers import
|
3 |
|
4 |
model_name = "Glasshes/debate_v3.1_model"
|
5 |
-
model =
|
6 |
-
tokenizer =
|
7 |
|
8 |
def generate_text(prompt):
|
9 |
input_ids = tokenizer.encode(prompt, return_tensors="pt")
|
@@ -17,7 +17,7 @@ iface = gr.Interface(
|
|
17 |
outputs="text",
|
18 |
live=True,
|
19 |
title="Debate Model",
|
20 |
-
description="This model generates text based on the input prompt.",
|
21 |
)
|
22 |
|
23 |
iface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
3 |
|
4 |
model_name = "Glasshes/debate_v3.1_model"
|
5 |
+
model = AutoModelForCausalLM.from_pretrained(model_name)
|
6 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
7 |
|
8 |
def generate_text(prompt):
|
9 |
input_ids = tokenizer.encode(prompt, return_tensors="pt")
|
|
|
17 |
outputs="text",
|
18 |
live=True,
|
19 |
title="Debate Model",
|
20 |
+
description="This model generates text based on the input prompt using Llama.",
|
21 |
)
|
22 |
|
23 |
iface.launch()
|