Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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}
|
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)
|