Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,15 +12,15 @@ from tools import evaluate_consumption, evaluate_consumption_example
|
|
| 12 |
from retriever import FrugalAI_methods
|
| 13 |
|
| 14 |
#HF_TOKEN = os.environ.get("HF_TOKEN")
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
# Initialize the Hugging Face model
|
| 20 |
model = LiteLLMModel(
|
| 21 |
-
model_id="
|
| 22 |
temperature=0.2,
|
| 23 |
-
|
| 24 |
)
|
| 25 |
|
| 26 |
evaluate_consumption = evaluate_consumption()
|
|
|
|
| 12 |
from retriever import FrugalAI_methods
|
| 13 |
|
| 14 |
#HF_TOKEN = os.environ.get("HF_TOKEN")
|
| 15 |
+
try:
|
| 16 |
+
API_KEY = os.environ.get("API_KEY")
|
| 17 |
+
except:
|
| 18 |
+
print("Please provide the Anthropic API_KEY in the secret variables")
|
| 19 |
# Initialize the Hugging Face model
|
| 20 |
model = LiteLLMModel(
|
| 21 |
+
model_id="gpt-4",
|
| 22 |
temperature=0.2,
|
| 23 |
+
api_key=API_KEY
|
| 24 |
)
|
| 25 |
|
| 26 |
evaluate_consumption = evaluate_consumption()
|