Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ model = AutoDistributedModelForCausalLM.from_pretrained(model_name)
|
|
9 |
|
10 |
import gradio as gr
|
11 |
|
12 |
-
def generate(input
|
13 |
tokenized = tokenizer(input, return_tensors="pt")["input_ids"]
|
14 |
outputs = model.generate(inputs, max_new_tokens=80, do_sample=True, temperature=0.9)
|
15 |
return tokenizer.decode(outputs[0]).replace("</s>", "");
|
|
|
9 |
|
10 |
import gradio as gr
|
11 |
|
12 |
+
def generate(input):
|
13 |
tokenized = tokenizer(input, return_tensors="pt")["input_ids"]
|
14 |
outputs = model.generate(inputs, max_new_tokens=80, do_sample=True, temperature=0.9)
|
15 |
return tokenizer.decode(outputs[0]).replace("</s>", "");
|