Spaces:
Runtime error
Runtime error
demo: add new lines
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ def run_query( prompt):
|
|
8 |
try:
|
9 |
with SecureSession(f"http://{DEMO_SERVER}", POLICY) as secure_session:
|
10 |
res = secure_session.post(endpoint="/generate", json={"input_text": prompt})
|
11 |
-
return("β
Query successful\n" + res.text)
|
12 |
except Exception as err:
|
13 |
return(f"β Query failed!\n{err}")
|
14 |
|
|
|
8 |
try:
|
9 |
with SecureSession(f"http://{DEMO_SERVER}", POLICY) as secure_session:
|
10 |
res = secure_session.post(endpoint="/generate", json={"input_text": prompt})
|
11 |
+
return("β
Query successful\n" + res.text.replace('\\n', '\n'))
|
12 |
except Exception as err:
|
13 |
return(f"β Query failed!\n{err}")
|
14 |
|