Spaces:
Paused
title: Schematron Inference
emoji: 💎
colorFrom: blue
colorTo: green
sdk: docker
sdk_version: 1.0.0
app_file: app.py
app_port: 7860
pinned: false
Schematron Inference
This space runs a simple FastAPI application for Schematron inference.
API Documentation
This Space provides a FastAPI application with a browsable API documentation. You can access it at the root of your Space's URL. For example:
https://harvesthealth-gemma-inference.hf.space/
Endpoints
GET /v1/models
This endpoint shows the available models.
POST /v1/completions
This endpoint is for simple text generation. It takes a prompt and returns a completion.
Here is an example of how to use curl to make a POST request to the /v1/completions endpoint:
curl -X POST -H "Content-Type: application/json" -d '{"model": "inference-net/Schematron-3B", "prompt": "Hello, world!"}' https://harvesthealth-gemma-inference.hf.space/v1/completions
POST /v1/chat/completions
This endpoint is for chat completions. It takes a list of messages and returns a response from the AI. The roles must alternate between "user" and "assistant".
Here is an example of how to use curl to make a POST request to the /v1/chat/completions endpoint:
curl -X POST -H "Content-Type: application/json" -d '{"model": "inference-net/Schematron-3B", "messages": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Hello, how are you?"}]}' https://harvesthealth-gemma-inference.hf.space/v1/chat/completions
Note: Replace https://harvesthealth-gemma-inference.hf.space with the actual URL of your Space.