Spaces:
Paused
Paused
Update olapp.py
Browse files
olapp.py
CHANGED
@@ -15,10 +15,10 @@ class OlHandler(BaseHTTPRequestHandler):
|
|
15 |
def do_GET(self):
|
16 |
query = urlparse(self.path).query
|
17 |
query_components = dict(qc.split("=") for qc in query.split("&"))
|
18 |
-
q = query_components["q"]
|
19 |
|
20 |
output = llm.create_completion(
|
21 |
-
q,
|
22 |
max_tokens=32,
|
23 |
echo=False
|
24 |
)["choices"][0]["text"]
|
|
|
15 |
def do_GET(self):
|
16 |
query = urlparse(self.path).query
|
17 |
query_components = dict(qc.split("=") for qc in query.split("&"))
|
18 |
+
q = urllib.parse.unquote_plus(query_components["q"])
|
19 |
|
20 |
output = llm.create_completion(
|
21 |
+
q.encode('utf-8'),
|
22 |
max_tokens=32,
|
23 |
echo=False
|
24 |
)["choices"][0]["text"]
|