Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available: 6.26.0
Streamlit Testing App - Setup Guide
Installation
pip install streamlit gradio_client
Running Locally
cd plate-detector
streamlit run streamlit_app.py
Fixing API Errors
If you see errors like:
β Cannot find a function with `api_name`: /detect
β Cannot find a function with `api_name`: /run_query
Step 1: Find Correct API Names
- Open the sidebar and click "Show Available APIs" button
- This will display all available API endpoints from your Space
- Look for the correct function names
Step 2: Update API Names
Edit streamlit_app.py and update these lines:
API_NAME_DETECT = "/predict" # Change this to actual API name
API_NAME_QUERY = "/predict_1" # Change this to actual API name
Common patterns:
- First function:
/predict - Second function:
/predict_1 - Or numbered:
/predict_0,/predict_1, etc.
Step 3: Test Again
streamlit run streamlit_app.py
Features
β Detection Tab - Upload image and detect license plate β Query Tab - Natural language database queries β Analytics Tab - View statistics and trends β API Debugging - Shows available endpoints and errors
Troubleshooting
| Issue | Solution |
|---|---|
use_column_width deprecated |
β
Fixed - already updated to use_container_width |
| API not found | Click "Show Available APIs" in sidebar to see correct names |
| Connection failed | Make sure Space URL is correct: BARATH0070/plate-detector |
| No results | Check if HF_TOKEN and DATABASE_URL are set in your Space |
Notes
- This is a LOCAL testing app only
- Do NOT push to HF Spaces
- Use it to test UI/UX before deploying
- Make sure your Gradio Space is running and accessible