Spaces:
Running
Running
Update README.md
Browse files
README.md
CHANGED
|
@@ -6,11 +6,28 @@ colorTo: purple
|
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
---
|
| 9 |
-
|
|
|
|
| 10 |
|
| 11 |
On this organization, you can find the following:
|
| 12 |
|
| 13 |
-
|
| 14 |
-
- Llama2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
|
|
|
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
---
|
| 9 |
+
|
| 10 |
+
[<img src="https://assets-global.website-files.com/63f3e085b054e9e3120238f1/63f3e0ba605c2a218c60f27e_image%201.svg" width="250"/>](image.png)
|
| 11 |
|
| 12 |
On this organization, you can find the following:
|
| 13 |
|
| 14 |
+
**Llama2 Interactive UI**
|
| 15 |
+
- Llama2 7B Chat - [Interactive UI](https://huggingface.co/spaces/huggingface-projects/llama-2-7b-chat)
|
| 16 |
+
- Llama2 13B Chat - [Interactive UI](https://huggingface.co/spaces/huggingface-projects/llama-2-13b-chat)
|
| 17 |
+
|
| 18 |
+
**Llama2 Inference API**
|
| 19 |
+
|
| 20 |
+
import requests
|
| 21 |
+
|
| 22 |
+
API_URL = "https://api-inference.huggingface.co/models/meta-llama/Llama-2-13b-chat-hf"
|
| 23 |
+
headers = {"Authorization": "Bearer hf_xxxxxxx"}
|
| 24 |
+
|
| 25 |
+
def query(payload):
|
| 26 |
+
response = requests.post(API_URL, headers=headers, json=payload)
|
| 27 |
+
return response.json()
|
| 28 |
+
|
| 29 |
+
output = query({"inputs": "What is the capital of France?",})
|
| 30 |
+
print (output[0]['generated_text'])
|
| 31 |
+
|
| 32 |
|
| 33 |
|