inoki-giskard commited on
Commit
7a1d097
1 Parent(s): 629a811

Prefill URL

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -8,6 +8,8 @@ import threading
8
  import sys
9
  import os
10
 
 
 
11
 
12
  LOG_FILE = "output.log"
13
 
@@ -77,7 +79,12 @@ theme = gr.themes.Soft(
77
  with gr.Blocks(theme=theme) as iface:
78
  with gr.Row():
79
  with gr.Column():
80
- url_input = gr.Textbox(label="Giskard Hub URL")
 
 
 
 
 
81
  api_key_input = gr.Textbox(
82
  label="Giskard Hub API Key",
83
  value=os.environ.get("GSK_API_KEY"),
 
8
  import sys
9
  import os
10
 
11
+ from giskard.settings import settings
12
+
13
 
14
  LOG_FILE = "output.log"
15
 
 
79
  with gr.Blocks(theme=theme) as iface:
80
  with gr.Row():
81
  with gr.Column():
82
+ url_input = gr.Textbox(
83
+ label="Giskard Hub URL",
84
+ value=f"htts://{os.environ.get('SPACE_HOST')}"
85
+ if os.environ.get("SPACE_HOST")
86
+ else f"http://{settings.host}:{settings.ws_port}",
87
+ )
88
  api_key_input = gr.Textbox(
89
  label="Giskard Hub API Key",
90
  value=os.environ.get("GSK_API_KEY"),