Update app.py
Browse files
app.py
CHANGED
@@ -2,8 +2,8 @@ from time import perf_counter
|
|
2 |
import streamlit as st
|
3 |
from transformers import pipeline, AutoModelForSequenceClassification, AutoTokenizer, GenerationConfig
|
4 |
|
5 |
-
def
|
6 |
-
return f"<|im_start|>user\n{input}
|
7 |
|
8 |
def generate_response(user_input):
|
9 |
prompt = formatted_prompt(user_input)
|
|
|
2 |
import streamlit as st
|
3 |
from transformers import pipeline, AutoModelForSequenceClassification, AutoTokenizer, GenerationConfig
|
4 |
|
5 |
+
def formatted_prompt(input)-> str:
|
6 |
+
return f"<|im_start|>user\n{input}<|im_end|>\n<|im_start|>assistant:"
|
7 |
|
8 |
def generate_response(user_input):
|
9 |
prompt = formatted_prompt(user_input)
|