1024m commited on
Commit
8afbb35
·
verified ·
1 Parent(s): afab4ab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -75,7 +75,7 @@ option_mapping = {"translation": "### TRANSLATION ###", "mcq": "### MCQ ###", "n
75
  "long response": "### LONG RESPONSE ###", "direct response": "### DIRECT RESPONSE ###", "paraphrase": "### PARAPHRASE ###", "code": "### CODE ###"}
76
  def generate_response(message, temperature, max_new_tokens, top_p, task):
77
  append_text = option_mapping.get(task, "")
78
- prompt = f"INPUT : {message} {append_text} ### RESPONSE : "
79
  print(f"Prompt: {prompt}")
80
  start_time = time.time()
81
  inputs = tokenizer.encode(prompt, return_tensors="pt").to(model.device)
 
75
  "long response": "### LONG RESPONSE ###", "direct response": "### DIRECT RESPONSE ###", "paraphrase": "### PARAPHRASE ###", "code": "### CODE ###"}
76
  def generate_response(message, temperature, max_new_tokens, top_p, task):
77
  append_text = option_mapping.get(task, "")
78
+ prompt = f"INPUT : {message} {append_text} RESPONSE : "
79
  print(f"Prompt: {prompt}")
80
  start_time = time.time()
81
  inputs = tokenizer.encode(prompt, return_tensors="pt").to(model.device)