MOHAMED4543 commited on
Commit
4c902ee
·
verified ·
1 Parent(s): 7d1b438

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -3,6 +3,10 @@ import requests
3
  api_url = "https://router.huggingface.co/hyperbolic/v1/chat/completions" # استبدل بالرابط الصحيح
4
 
5
 
 
 
 
 
6
  data = {
7
  "inputs": " مخترع المصباح من "
8
  }
@@ -14,5 +18,4 @@ if response.status_code == 200:
14
  print(response.json())
15
  else:
16
  print(f"Error: {response.status_code}")
17
- print(response.text)
18
-
 
3
  api_url = "https://router.huggingface.co/hyperbolic/v1/chat/completions" # استبدل بالرابط الصحيح
4
 
5
 
6
+ headers = {
7
+ "Authorization": f"Bearer {api_token}"
8
+ }
9
+
10
  data = {
11
  "inputs": " مخترع المصباح من "
12
  }
 
18
  print(response.json())
19
  else:
20
  print(f"Error: {response.status_code}")
21
+ print(response.text)