ikerua commited on
Commit
da4d9b1
unverified
1 Parent(s): 2dfe493

Update API URL and fix HTML component case

Browse files

Updated API URL for local and Render environments, corrected gr.Html to gr.HTML.

Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -2,10 +2,11 @@ import gradio as gr
2
  import requests
3
  from PIL import Image
4
  import io
5
- # URL of the API created with FastAPI
6
- API_URL = "https://predictor-api-4pbm.onrender.com"
7
-
8
 
 
 
 
 
9
 
10
  def solicitar_prediccion(image_path):
11
  """
@@ -83,7 +84,8 @@ with gr.Blocks(title="Predictor & Resizer API Client") as demo:
83
  predict_btn = gr.Button("馃攳 Obtener Predicci贸n", variant="primary")
84
  predict_output = gr.Textbox(label="Resultado de la API")
85
 
86
- gr.Html("<hr>") # Separador visual
 
87
 
88
  # --- Secci贸n de Resize ---
89
  gr.Markdown("### 3. Redimensionar (Resize)")
@@ -109,6 +111,7 @@ with gr.Blocks(title="Predictor & Resizer API Client") as demo:
109
  inputs=[input_image, w_input, h_input],
110
  outputs=resize_output
111
  )
 
112
  # Lanzar la aplicaci贸n
113
  if __name__ == "__main__":
114
- demo.launch()
 
2
  import requests
3
  from PIL import Image
4
  import io
 
 
 
5
 
6
+ # URL de tu API
7
+ # Si est谩s ejecutando esto en local, suele ser http://127.0.0.1:8000
8
+ # Si la API est谩 en Render, usa la URL de Render (ej: https://tuproyecto.onrender.com)
9
+ API_URL = "http://127.0.0.1:8000"
10
 
11
  def solicitar_prediccion(image_path):
12
  """
 
84
  predict_btn = gr.Button("馃攳 Obtener Predicci贸n", variant="primary")
85
  predict_output = gr.Textbox(label="Resultado de la API")
86
 
87
+ # CORRECCI脫N AQU脥: gr.HTML en may煤sculas
88
+ gr.HTML("<hr>")
89
 
90
  # --- Secci贸n de Resize ---
91
  gr.Markdown("### 3. Redimensionar (Resize)")
 
111
  inputs=[input_image, w_input, h_input],
112
  outputs=resize_output
113
  )
114
+
115
  # Lanzar la aplicaci贸n
116
  if __name__ == "__main__":
117
+ demo.launch()