Spaces:
Sleeping
Sleeping
Fix function
Browse files
app.py
CHANGED
@@ -12,8 +12,8 @@ tokenizer = AutoTokenizer.from_pretrained("gsarti/phi3-mini-rebus-solver-fp16")
|
|
12 |
model = AutoModelForCausalLM.from_pretrained("gsarti/phi3-mini-rebus-solver-fp16")
|
13 |
|
14 |
@spaces.GPU
|
15 |
-
def solve_verbalized_rebus(
|
16 |
-
input = template.format(input=
|
17 |
inputs = tokenizer(input, return_tensors="pt")["input_ids"]
|
18 |
outputs = model.generate(input_ids = inputs, max_new_tokens = 500, use_cache = True)
|
19 |
model_generations = tokenizer.batch_decode(outputs)
|
|
|
12 |
model = AutoModelForCausalLM.from_pretrained("gsarti/phi3-mini-rebus-solver-fp16")
|
13 |
|
14 |
@spaces.GPU
|
15 |
+
def solve_verbalized_rebus(example, history):
|
16 |
+
input = template.format(input=example)
|
17 |
inputs = tokenizer(input, return_tensors="pt")["input_ids"]
|
18 |
outputs = model.generate(input_ids = inputs, max_new_tokens = 500, use_cache = True)
|
19 |
model_generations = tokenizer.batch_decode(outputs)
|