Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -101,8 +101,12 @@ def chat(message,
|
|
101 |
system_message,
|
102 |
max_tokens,
|
103 |
temperature,
|
104 |
-
top_p):
|
105 |
-
|
|
|
|
|
|
|
|
|
106 |
for val in history:
|
107 |
if val[0]:
|
108 |
messages.append({"role": "user", "content": val[0]})
|
@@ -128,7 +132,7 @@ ai1=gr.ChatInterface(
|
|
128 |
value=0.1,
|
129 |
step=0.05,
|
130 |
label="Top-p (nucleus sampling)",
|
131 |
-
)
|
132 |
],
|
133 |
)
|
134 |
with gr.Blocks(theme="prithivMLmods/Minecraft-Theme") as ai:
|
|
|
101 |
system_message,
|
102 |
max_tokens,
|
103 |
temperature,
|
104 |
+
top_p, search_key=""):
|
105 |
+
if search_key=="":
|
106 |
+
s="(NO DATA!)"
|
107 |
+
else:
|
108 |
+
s=search(term=search_key)
|
109 |
+
messages=[{"role":"system","content":system_message+f"And, your name is chatchat made by an elementry school student who's huggingface id is peterpeter8585.Thankfully, the user gave you a information for the question.There could be a information or no information.INFO:{s}"}]
|
110 |
for val in history:
|
111 |
if val[0]:
|
112 |
messages.append({"role": "user", "content": val[0]})
|
|
|
132 |
value=0.1,
|
133 |
step=0.05,
|
134 |
label="Top-p (nucleus sampling)",
|
135 |
+
), gr.Textbox(value="", label="Search Key", interactive=True)
|
136 |
],
|
137 |
)
|
138 |
with gr.Blocks(theme="prithivMLmods/Minecraft-Theme") as ai:
|