Spaces:
Paused
Paused
Update olapp.py
Browse files
olapp.py
CHANGED
@@ -16,7 +16,7 @@ class OlHandler(BaseHTTPRequestHandler):
|
|
16 |
def do_GET(self):
|
17 |
query_components = parse_qs(urlparse(self.path).query)
|
18 |
#q = urllib.parse.unquote_plus(query_components["q"]) #.encode("cp1252").decode("utf-8"))
|
19 |
-
q = query_components["q"][0]
|
20 |
|
21 |
#output = llm.create_completion(
|
22 |
# q,
|
@@ -25,6 +25,7 @@ class OlHandler(BaseHTTPRequestHandler):
|
|
25 |
#)["choices"][0]["text"].encode("cp1252").decode("utf-8")
|
26 |
|
27 |
self.send_response(200)
|
|
|
28 |
self.end_headers()
|
29 |
#self.wfile.write(output.encode('utf-8'))
|
30 |
self.wfile.write(q.encode('utf-8'))
|
|
|
16 |
def do_GET(self):
|
17 |
query_components = parse_qs(urlparse(self.path).query)
|
18 |
#q = urllib.parse.unquote_plus(query_components["q"]) #.encode("cp1252").decode("utf-8"))
|
19 |
+
q = query_components["q"][0] #.encode("utf-8").decode("cp1252")
|
20 |
|
21 |
#output = llm.create_completion(
|
22 |
# q,
|
|
|
25 |
#)["choices"][0]["text"].encode("cp1252").decode("utf-8")
|
26 |
|
27 |
self.send_response(200)
|
28 |
+
self.send_header('Content-type','text/plain; charset=utf-8')
|
29 |
self.end_headers()
|
30 |
#self.wfile.write(output.encode('utf-8'))
|
31 |
self.wfile.write(q.encode('utf-8'))
|