Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def infer(prompt, seed=0, randomize_seed=True, max_new_tokens=100, temperature=0
|
|
27 |
).to(device)
|
28 |
|
29 |
# Construct Alpaca-style prompt
|
30 |
-
alpaca_prompt = f"### Instruction
|
31 |
|
32 |
# Tokenize the input
|
33 |
inputs = tokenizer(alpaca_prompt, return_tensors="pt").to(device)
|
@@ -47,9 +47,9 @@ def infer(prompt, seed=0, randomize_seed=True, max_new_tokens=100, temperature=0
|
|
47 |
return response_only
|
48 |
|
49 |
examples = [
|
50 |
-
"
|
51 |
-
|
52 |
-
|
53 |
]
|
54 |
|
55 |
css = """
|
|
|
27 |
).to(device)
|
28 |
|
29 |
# Construct Alpaca-style prompt
|
30 |
+
alpaca_prompt = f"### Instruction:Based on user interests and past activities, recommend tasks they might enjoy.\n ### Input:{prompt}\n\n### Response:\n"
|
31 |
|
32 |
# Tokenize the input
|
33 |
inputs = tokenizer(alpaca_prompt, return_tensors="pt").to(device)
|
|
|
47 |
return response_only
|
48 |
|
49 |
examples = [
|
50 |
+
'{"user_interests": ["fitness", "food", "community"], "past_tasks": [{"title": "Led group runs", "description": "Organized weekly jogs."}, {"title": "Tried meal prep", "description": "Cooked for a full week."}, {"title": "Joined charity walks", "description": "Helped fundraise for causes."}]}'
|
51 |
+
,
|
52 |
+
|
53 |
]
|
54 |
|
55 |
css = """
|