Asna-DifiNative commited on
Commit
d6eaeec
·
1 Parent(s): d8b4295

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -17,13 +17,14 @@ def translate_instruction(context, input_text):
17
  return translated_text
18
 
19
 
20
- # # Example instructions
21
- examples = [
22
- ["Show me a list of pods in the current namespace."],
23
- ["Display the pods running in the 'development' namespace."],
24
- ["List all pods in the 'production' environment."],
25
- ["How can I see the pods in the 'testing' namespace?"],
26
- ["What command should I use to get the list of containers?"]
 
27
  ]
28
 
29
  # Gradio Interface
@@ -34,7 +35,7 @@ iface = gr.Interface(
34
  gr.inputs.Textbox(label="Enter Human Instruction")
35
  ],
36
  outputs=gr.outputs.Textbox(label="Generated CLI Command"),
37
- examples = examples,
38
  )
39
 
40
  # Launch the Gradio app using Ngrok
 
17
  return translated_text
18
 
19
 
20
+ # Examples function
21
+ def examples():
22
+ return [
23
+ ["Show me a list of pods in the current namespace."],
24
+ ["Display the pods running in the 'development' namespace."],
25
+ ["List all pods in the 'production' environment."],
26
+ ["How can I see the pods in the 'testing' namespace?"],
27
+ ["What command should I use to get the list of containers?"]
28
  ]
29
 
30
  # Gradio Interface
 
35
  gr.inputs.Textbox(label="Enter Human Instruction")
36
  ],
37
  outputs=gr.outputs.Textbox(label="Generated CLI Command"),
38
+ examples = examples(),
39
  )
40
 
41
  # Launch the Gradio app using Ngrok