Spaces:
Sleeping
Sleeping
Commit
·
9e3ea07
1
Parent(s):
1e929f5
Update main.py
Browse files
main.py
CHANGED
|
@@ -1,10 +1,11 @@
|
|
| 1 |
-
from fastapi import FastAPI
|
|
|
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
|
| 4 |
app = FastAPI()
|
| 5 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
| 6 |
|
| 7 |
-
class InputData():
|
| 8 |
input: str
|
| 9 |
|
| 10 |
def format_prompt(message, history):
|
|
|
|
| 1 |
+
from fastapi import FastAPI, Request
|
| 2 |
+
from pydantic import BaseModel
|
| 3 |
from huggingface_hub import InferenceClient
|
| 4 |
|
| 5 |
app = FastAPI()
|
| 6 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
| 7 |
|
| 8 |
+
class InputData(BaseModel):
|
| 9 |
input: str
|
| 10 |
|
| 11 |
def format_prompt(message, history):
|