Spaces:
Runtime error
Runtime error
more examples
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ model_key = os.getenv("MODEL_KEY")
|
|
6 |
|
7 |
title = "CodeAlpaca"
|
8 |
description = "Instruction following model for code generation."
|
9 |
-
examples = ["Write a python function to sort a list."]
|
10 |
def call_model(prompt):
|
11 |
model_parameters = {
|
12 |
"prompt": prompt,
|
@@ -16,5 +16,5 @@ def call_model(prompt):
|
|
16 |
out = banana.run(api_key, model_key, model_parameters)
|
17 |
return out["modelOutputs"][0]["output"]
|
18 |
|
19 |
-
iface = gr.Interface(fn=call_model, inputs="text", outputs=gr.
|
20 |
iface.launch()
|
|
|
6 |
|
7 |
title = "CodeAlpaca"
|
8 |
description = "Instruction following model for code generation."
|
9 |
+
examples = ["Write a python function to sort a list.","Write a function to scrape hacker news.","Implement a utility function to compute the accuracy of predictions using metric from sklearn."]
|
10 |
def call_model(prompt):
|
11 |
model_parameters = {
|
12 |
"prompt": prompt,
|
|
|
16 |
out = banana.run(api_key, model_key, model_parameters)
|
17 |
return out["modelOutputs"][0]["output"]
|
18 |
|
19 |
+
iface = gr.Interface(fn=call_model, inputs="text", outputs=gr.Code(label="Output",lines=20),examples=examples,description=description,title=title)
|
20 |
iface.launch()
|