Spaces:
Sleeping
Sleeping
Commit
·
b9a8926
1
Parent(s):
71eba3b
updates
Browse files- app.py +17 -13
- my_project.code-workspace +11 -0
app.py
CHANGED
@@ -9,26 +9,30 @@ import uuid
|
|
9 |
import os
|
10 |
from datetime import datetime
|
11 |
import urllib.parse
|
12 |
-
|
13 |
|
14 |
-
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
|
20 |
-
#
|
21 |
-
|
22 |
|
23 |
-
|
|
|
|
|
|
|
|
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
# }
|
28 |
|
29 |
-
|
30 |
-
|
31 |
|
|
|
32 |
|
33 |
user_prompt_examples =[
|
34 |
"Find me the stars in the hayedes cluster.",
|
|
|
9 |
import os
|
10 |
from datetime import datetime
|
11 |
import urllib.parse
|
12 |
+
import openai
|
13 |
|
14 |
+
from dotenv import load_dotenv
|
15 |
|
16 |
+
load_dotenv()
|
17 |
+
hugging_face_api_key = os.getenv("HUGGING_FACE_API_KEY")
|
18 |
+
openai_api_key = os.getenv("OPENAI_API_KEY")
|
19 |
|
20 |
+
# Set the API key for OpenAI
|
21 |
+
openai.api_key = openai_api_key
|
22 |
|
23 |
+
import requests
|
24 |
+
|
25 |
+
headers = {
|
26 |
+
"Authorization": f"Bearer {hugging_face_api_key}"
|
27 |
+
}
|
28 |
|
29 |
+
response = requests.get("https://api.huggingface.co/endpoint", headers=headers)
|
30 |
+
print(response.json())
|
|
|
31 |
|
32 |
+
<<<<<<< Updated upstream
|
33 |
+
=======
|
34 |
|
35 |
+
>>>>>>> Stashed changes
|
36 |
|
37 |
user_prompt_examples =[
|
38 |
"Find me the stars in the hayedes cluster.",
|
my_project.code-workspace
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"folders": [
|
3 |
+
{
|
4 |
+
"path": "C:/Users/Tom/Documents/EV3/my_project"
|
5 |
+
}
|
6 |
+
],
|
7 |
+
"settings": {
|
8 |
+
"debug.openDebug": "neverOpen",
|
9 |
+
"python.languageServer": "None"
|
10 |
+
}
|
11 |
+
}
|