Team Ai
Apppublic

Al3ssio-urs0/devstral-coding-helper

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
App README

Devstral / Mistral Coding Helper

This Space can run in two ways. Only one file should be named app.py.

Variant A — Hugging Face Inference API (no GPU required)

  1. 1.Ensure the file app_hf.py is renamed to `app.py`.
  2. 2.Go to Settings → Variables and add:
  3. 3.HF_TOKEN = hf_... (your Hugging Face token with the Read role)
  4. 4.(optional) MODEL_ID = mistralai/Mistral-7B-Instruct-v0.3
  5. 5.Wait for the Space to rebuild and click App to test.

Variant B — Mistral API (use Devstral)

  1. 1.Ensure the file app_mistral.py is renamed to `app.py`.
  2. 2.Go to Settings → Variables and add:
  3. 3.MISTRAL_API_KEY = ... (from https://console.mistral.ai/)
  4. 4.(optional) MISTRAL_MODEL = devstral-small-latest
  5. 5.(optional) MISTRAL_BASE_URL = https://api.mistral.ai/v1
  6. 6.Wait for the Space to rebuild and click App to test.

Troubleshooting

  • —“configuration error / Missing configuration in README” → You’re missing this YAML block at the top of README. Keep it exactly as shown.
  • —KeyError: 'HF_TOKEN' or 'MISTRAL_API_KEY' → Add the missing variable in Settings → Variables, then restart.
  • —App keeps Building / Error → Check Logs; ensure requirements.txt is present and the correct file is named app.py.
  • —Wrong variant running → Only one file should be app.py. Rename the other back to app_hf.py or app_mistral.py.