Amrith2k6 commited on
Commit
67f9be0
·
verified ·
1 Parent(s): e93659a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -0
app.py CHANGED
@@ -13,6 +13,33 @@ from typing import Tuple, List, Dict, Any, Optional
13
  import gradio as gr
14
  from dotenv import load_dotenv
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  # Load environment variables
17
  load_dotenv()
18
 
 
13
  import gradio as gr
14
  from dotenv import load_dotenv
15
 
16
+ # ===== TEMPORARY API KEY TEST =====
17
+ import requests
18
+ print("\n" + "="*50)
19
+ print("🔍 TESTING DEEPSEEK API KEY DIRECTLY")
20
+ print("="*50)
21
+
22
+ api_key = "sk-833a006ca1914f6b827b55549532b65d" # Your key
23
+ print(f"Testing key: {api_key[:10]}...")
24
+
25
+ try:
26
+ headers = {"Authorization": f"Bearer {api_key}"}
27
+ response = requests.get(
28
+ "https://api.deepseek.com/v1/models",
29
+ headers=headers,
30
+ timeout=10
31
+ )
32
+ print(f"Status Code: {response.status_code}")
33
+ if response.status_code == 200:
34
+ print("✅ SUCCESS! Key works!")
35
+ print(f"Response: {response.json()}")
36
+ else:
37
+ print(f"❌ FAILED: {response.text}")
38
+ except Exception as e:
39
+ print(f"❌ ERROR: {e}")
40
+ print("="*50 + "\n")
41
+ # ===== END TEST =====
42
+
43
  # Load environment variables
44
  load_dotenv()
45