Update app.py
Browse files
app.py
CHANGED
@@ -21,6 +21,9 @@ def get_usernames(model: str):
|
|
21 |
return openchat_preprompt, "<human>: ", "<bot>: ", "\n"
|
22 |
return "", "User: ", "Assistant: ", "\n"
|
23 |
|
|
|
|
|
|
|
24 |
def predict(model: str, inputs: str, typical_p: float, top_p: float, temperature: float, top_k: int, repetition_penalty: float, watermark: bool, chatbot, history):
|
25 |
client = get_client(model)
|
26 |
preprompt, user_name, assistant_name, sep = get_usernames(model)
|
|
|
21 |
return openchat_preprompt, "<human>: ", "<bot>: ", "\n"
|
22 |
return "", "User: ", "Assistant: ", "\n"
|
23 |
|
24 |
+
def reset_textbox():
|
25 |
+
inputs.value = "" # Reset the value of the inputs textbox
|
26 |
+
|
27 |
def predict(model: str, inputs: str, typical_p: float, top_p: float, temperature: float, top_k: int, repetition_penalty: float, watermark: bool, chatbot, history):
|
28 |
client = get_client(model)
|
29 |
preprompt, user_name, assistant_name, sep = get_usernames(model)
|