ancerlop commited on
Commit
77333a1
·
1 Parent(s): e4553fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -7
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(json_obj, f)
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