Spaces:
Runtime error
Runtime error
Commit ·
028e671
1
Parent(s): 9391764
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,6 @@ model = BartForConditionalGeneration.from_pretrained(model_path)
|
|
| 10 |
tokenizer = BartTokenizer.from_pretrained(model_path)
|
| 11 |
|
| 12 |
|
| 13 |
-
|
| 14 |
# Translate function using the fine-tuned model
|
| 15 |
def translate_instruction(context, input_text):
|
| 16 |
full_input = context + " " + input_text
|
|
@@ -32,14 +31,17 @@ iface = gr.Interface(
|
|
| 32 |
title="CLI Command Generator",
|
| 33 |
description="<p>This tool generates CLI commands from human instructions and context.</p>"
|
| 34 |
"<p>Provide a context and human instruction, and click 'Generate' to get the CLI command.</p>",
|
| 35 |
-
examples=
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
| 43 |
#examples_align = "left"
|
| 44 |
)
|
| 45 |
|
|
|
|
| 10 |
tokenizer = BartTokenizer.from_pretrained(model_path)
|
| 11 |
|
| 12 |
|
|
|
|
| 13 |
# Translate function using the fine-tuned model
|
| 14 |
def translate_instruction(context, input_text):
|
| 15 |
full_input = context + " " + input_text
|
|
|
|
| 31 |
title="CLI Command Generator",
|
| 32 |
description="<p>This tool generates CLI commands from human instructions and context.</p>"
|
| 33 |
"<p>Provide a context and human instruction, and click 'Generate' to get the CLI command.</p>",
|
| 34 |
+
examples="""<div style='text-align: left'>
|
| 35 |
+
<p>Examples:</p>
|
| 36 |
+
<ul>
|
| 37 |
+
<li>Pod xyz is called as tiger. -> Show me a list of pods in the current namespace.</li>
|
| 38 |
+
<li>Nickname of deployment development is cap -> Display the pods running in the cap.</li>
|
| 39 |
+
<li>Production is also known as -> List all pods in the 'production' environment.</li>
|
| 40 |
+
<li>Kubernetes -> Show the pods running in the 'testing' namespace?</li>
|
| 41 |
+
<li>Docker -> What command should I use to get the list of containers?</li>
|
| 42 |
+
</ul>
|
| 43 |
+
</div>"
|
| 44 |
+
#examples_style = {"textAlign": "left"}
|
| 45 |
#examples_align = "left"
|
| 46 |
)
|
| 47 |
|