Update app.py
Browse files
app.py
CHANGED
@@ -39,16 +39,10 @@ def process_input(text, rag, prompt_template):
|
|
39 |
if prompt_template:
|
40 |
prompt += prompt_template_text
|
41 |
output = generate(prompt)
|
42 |
-
|
43 |
-
# Convertimos el generador en una cadena JSON
|
44 |
-
json_str = ''.join(output)
|
45 |
-
|
46 |
-
# Convertimos la cadena JSON en un objeto JSON
|
47 |
-
json_obj = json.loads(json_str)
|
48 |
|
49 |
# Generamos el archivo JSON
|
50 |
with open('output.json', 'w') as f:
|
51 |
-
json.dump(
|
52 |
|
53 |
return output
|
54 |
|
|
|
39 |
if prompt_template:
|
40 |
prompt += prompt_template_text
|
41 |
output = generate(prompt)
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
# Generamos el archivo JSON
|
44 |
with open('output.json', 'w') as f:
|
45 |
+
json.dump(output, f)
|
46 |
|
47 |
return output
|
48 |
|