Spaces:
Runtime error
Runtime error
Commit ·
d6eaeec
1
Parent(s): d8b4295
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,13 +17,14 @@ def translate_instruction(context, input_text):
|
|
| 17 |
return translated_text
|
| 18 |
|
| 19 |
|
| 20 |
-
#
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
|
|
|
| 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
|