ancerlop commited on
Commit
18882b0
1 Parent(s): 8c0a5be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -130,12 +130,11 @@ def create_interface():
130
  # Definimos la función que se ejecutará cuando se envíe la entrada
131
  def fn(text, rag, prompt_template):
132
 
133
- with open('output.json', 'r') as f:
134
- data = json.load(f)
135
- classification_types = [item['clasificacion_tipo'] for item in data]
136
  classification_types_options = [(option, option) for option in classification_types]
137
  classification_types_checkboxes = gr.CheckboxGroup(label="Clasificacion Tipo", choices=classification_types_options, interactive = True)
138
- output = process_input(text, rag, prompt_template)
139
  return output, classification_types_checkboxes
140
 
141
  examples = [
 
130
  # Definimos la función que se ejecutará cuando se envíe la entrada
131
  def fn(text, rag, prompt_template):
132
 
133
+ output = process_input(text, rag, prompt_template)
134
+ classification_types = [item['clasificacion_tipo'] for item in output]
 
135
  classification_types_options = [(option, option) for option in classification_types]
136
  classification_types_checkboxes = gr.CheckboxGroup(label="Clasificacion Tipo", choices=classification_types_options, interactive = True)
137
+
138
  return output, classification_types_checkboxes
139
 
140
  examples = [