kwabs22
commited on
Commit
•
74d7e67
1
Parent(s):
6f94d14
Small changes
Browse files
app.py
CHANGED
@@ -46,15 +46,15 @@ def generate_response(user_message): #generate_response_token_by_token
|
|
46 |
|
47 |
|
48 |
def custom_generate_response(cust_user_message):
|
49 |
-
cust_user_message = CustomPrompts[0] + '\n\n' + cust_user_message
|
50 |
yield from generate_response(cust_user_message)
|
51 |
|
52 |
def custom_generate_response1(cust_user_message):
|
53 |
-
cust_user_message = CustomPrompts[1] + '\n\n' + cust_user_message
|
54 |
yield from generate_response(cust_user_message)
|
55 |
|
56 |
def custom_generate_response2(cust_user_message):
|
57 |
-
cust_user_message = CustomPrompts[2] + '\n
|
58 |
yield from generate_response(cust_user_message)
|
59 |
|
60 |
CustomPrompts = [
|
@@ -69,7 +69,7 @@ with gr.Blocks() as iface:
|
|
69 |
inputs=gr.Textbox(lines=2, placeholder="Type your message here..."),
|
70 |
outputs="text",
|
71 |
title="Stable LM 2 Zephyr (1.6b) LLama.cpp Interface Test",
|
72 |
-
description="No Message History for now - Enter your message and get a response.",
|
73 |
flagging_dir="/usr/src/app/flagged",
|
74 |
)
|
75 |
#gr.Interface(fn=generate_response_token_by_token, inputs=gr.Textbox(lines=2, placeholder='Type prompt here...'), outputs="text", description="More Responsive streaming test")
|
|
|
46 |
|
47 |
|
48 |
def custom_generate_response(cust_user_message):
|
49 |
+
cust_user_message = CustomPrompts[0] + '\n\n' + cust_user_message + '\n\n'
|
50 |
yield from generate_response(cust_user_message)
|
51 |
|
52 |
def custom_generate_response1(cust_user_message):
|
53 |
+
cust_user_message = CustomPrompts[1] + '\n\n' + cust_user_message + '\n\n'
|
54 |
yield from generate_response(cust_user_message)
|
55 |
|
56 |
def custom_generate_response2(cust_user_message):
|
57 |
+
cust_user_message = CustomPrompts[2] + '\n' + cust_user_message + '\n\n'
|
58 |
yield from generate_response(cust_user_message)
|
59 |
|
60 |
CustomPrompts = [
|
|
|
69 |
inputs=gr.Textbox(lines=2, placeholder="Type your message here..."),
|
70 |
outputs="text",
|
71 |
title="Stable LM 2 Zephyr (1.6b) LLama.cpp Interface Test",
|
72 |
+
description="No Prompt template used yet (Essentially autocomplete). No Message History for now - Enter your message and get a response.",
|
73 |
flagging_dir="/usr/src/app/flagged",
|
74 |
)
|
75 |
#gr.Interface(fn=generate_response_token_by_token, inputs=gr.Textbox(lines=2, placeholder='Type prompt here...'), outputs="text", description="More Responsive streaming test")
|