raduqus commited on
Commit
999f5b0
·
verified ·
1 Parent(s): 029911f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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:\n{prompt}\n\n### Response:\n"
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
- "Give me a recommendation for a sci-fi book.",
51
- "Suggest a travel destination based on cultural history.",
52
- "What's a good idea for a birthday party theme?",
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 = """