Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -6,7 +6,7 @@ import uvicorn
|
|
| 6 |
|
| 7 |
app = FastAPI()
|
| 8 |
|
| 9 |
-
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.
|
| 10 |
|
| 11 |
class Item(BaseModel):
|
| 12 |
prompt: str
|
|
@@ -48,7 +48,7 @@ def generate(item: Item):
|
|
| 48 |
output += response.token.text
|
| 49 |
return output
|
| 50 |
|
| 51 |
-
@app.post("/
|
| 52 |
async def generate_text(item: Item):
|
| 53 |
return {"response": generate(item)}
|
| 54 |
|
|
|
|
| 6 |
|
| 7 |
app = FastAPI()
|
| 8 |
|
| 9 |
+
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.3")
|
| 10 |
|
| 11 |
class Item(BaseModel):
|
| 12 |
prompt: str
|
|
|
|
| 48 |
output += response.token.text
|
| 49 |
return output
|
| 50 |
|
| 51 |
+
@app.post("/chat/completions/")
|
| 52 |
async def generate_text(item: Item):
|
| 53 |
return {"response": generate(item)}
|
| 54 |
|