Philippe Kaplan
commited on
Commit
Β·
8d05041
1
Parent(s):
8556750
fix files
Browse files- README.md +1 -1
- app.py β main.py +12 -1
README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
emoji: π
|
4 |
colorFrom: blue
|
5 |
colorTo: red
|
|
|
1 |
---
|
2 |
+
title: Mistral-7B-Instruct-v0.3
|
3 |
emoji: π
|
4 |
colorFrom: blue
|
5 |
colorTo: red
|
app.py β main.py
RENAMED
@@ -1,4 +1,15 @@
|
|
1 |
# from https://huggingface.co/spaces/iiced/mixtral-46.7b-fastapi/blob/main/main.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
from fastapi import FastAPI
|
3 |
from pydantic import BaseModel
|
4 |
from huggingface_hub import InferenceClient
|
@@ -7,7 +18,7 @@ import uvicorn
|
|
7 |
|
8 |
app = FastAPI()
|
9 |
|
10 |
-
client = InferenceClient("mistralai/
|
11 |
|
12 |
class Item(BaseModel):
|
13 |
prompt: str
|
|
|
1 |
# from https://huggingface.co/spaces/iiced/mixtral-46.7b-fastapi/blob/main/main.py
|
2 |
+
# example of use:
|
3 |
+
# curl -X POST \
|
4 |
+
# -H "Content-Type: application/json" \
|
5 |
+
# -d '{
|
6 |
+
# "prompt": "What is the capital of France?",
|
7 |
+
# "history": [],
|
8 |
+
# "system_prompt": "You are a very powerful AI assistant."
|
9 |
+
# }' \
|
10 |
+
# https://iiced-mixtral-46-7b-fastapi.hf.space/generate/
|
11 |
+
|
12 |
+
|
13 |
from fastapi import FastAPI
|
14 |
from pydantic import BaseModel
|
15 |
from huggingface_hub import InferenceClient
|
|
|
18 |
|
19 |
app = FastAPI()
|
20 |
|
21 |
+
client = InferenceClient("mistralai/Mistral-7B-Instruct-v0.3")
|
22 |
|
23 |
class Item(BaseModel):
|
24 |
prompt: str
|