jcmachicao commited on
Commit
19ad5c1
·
verified ·
1 Parent(s): b1cd9e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -11,7 +11,7 @@ import openai
11
  API_KEY = os.getenv("OAIK")
12
  client = openai.OpenAI(api_key=API_KEY)
13
 
14
- api_key_airt = os.getenv("AIRT")
15
  AIRT_DBASE = 'appUuBVTJR5ju0y6J'
16
  AIRT_TABLE = 'foros_postdoc'
17
 
@@ -107,9 +107,7 @@ with iface:
107
 
108
  with gr.Row():
109
  gr.Markdown("## Red de Aportes:")
110
-
111
- graph_output = gr.Image(label="Red de Aportes") # Create an empty image widget
112
- graph_output.update(value=visualizar_grafo()) # Update it after initializing graph
113
 
114
  with gr.Row():
115
  nombre = gr.Dropdown(choices=students, label="Nombre del Estudiante")
@@ -121,7 +119,7 @@ with iface:
121
  submit_button.click(
122
  fn=agregar_aporte,
123
  inputs=[nombre, texto],
124
- outputs=graph_output
125
  )
126
 
127
  iface.launch(share=True)
 
11
  API_KEY = os.getenv("OAIK")
12
  client = openai.OpenAI(api_key=API_KEY)
13
 
14
+ api_key_airt = os.getenv("AIRT_KEY")
15
  AIRT_DBASE = 'appUuBVTJR5ju0y6J'
16
  AIRT_TABLE = 'foros_postdoc'
17
 
 
107
 
108
  with gr.Row():
109
  gr.Markdown("## Red de Aportes:")
110
+ graph_output = gr.Image(visualizar_grafo(), label="Red de Aportes") # ✅ Correct
 
 
111
 
112
  with gr.Row():
113
  nombre = gr.Dropdown(choices=students, label="Nombre del Estudiante")
 
119
  submit_button.click(
120
  fn=agregar_aporte,
121
  inputs=[nombre, texto],
122
+ outputs=[graph_output]
123
  )
124
 
125
  iface.launch(share=True)