Spaces:
Running
Running
injilashah
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -21,8 +21,8 @@ def Sentence_Commpletion(model_name, input):
|
|
21 |
outputs = model.generate(input.inputid, max_length=30, num_return_sequences=1)
|
22 |
elif model_name == "Gemma":
|
23 |
tokenizer, model = g_tokenizer, g_model
|
24 |
-
inputid =
|
25 |
-
outputs =
|
26 |
return tokenizer.decode(outputs[0])
|
27 |
|
28 |
|
|
|
21 |
outputs = model.generate(input.inputid, max_length=30, num_return_sequences=1)
|
22 |
elif model_name == "Gemma":
|
23 |
tokenizer, model = g_tokenizer, g_model
|
24 |
+
inputid = tokenizer(input, return_tensors="pt")
|
25 |
+
outputs = model.generate(**inputid, max_new_tokens=20)
|
26 |
return tokenizer.decode(outputs[0])
|
27 |
|
28 |
|