Skip to content

Commit 6dbe0c5

Browse files
committed
fix: Update Gradio app and inference docs for correct dependency installation
This commit makes two key changes: - Updates inference.md to use `dev` extra instead of `gradio` for dependency installation - Modifies Gradio app to list all models, not just deployed ones
1 parent d86d40d commit 6dbe0c5

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

docs/how_to/inference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ As for remote inference, you can pass the `annotate` parameter to return a previ
7979
## 🖼️ Cloud Inference with Gradio
8080
You can further use Gradio to create a web interface for your model.
8181

82-
First, install the `gradio` extra dependency.
82+
First, install the `dev` extra dependency.
8383

8484
```bash linenums="0"
85-
pip install '.[gradio]'
85+
pip install '.[dev]'
8686
```
8787

8888
To use it, use an environment variable with your Focoos API key and run the app (you will select the model from the UI).

gradio/app.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
import os
22

33
import cv2
4-
from dotenv import load_dotenv
54

65
import gradio as gr
76
from focoos import Focoos
87

9-
load_dotenv()
108
ASSETS_DIR = os.path.dirname(os.path.abspath(__file__)) + "/assets"
119

1210
focoos_models = []
1311
focoos = Focoos(api_key=os.getenv("FOCOOS_API_KEY"))
14-
focoos_models = [model.ref for model in focoos.list_focoos_models() if model.status == "DEPLOYED"]
12+
focoos_models = [model.ref for model in focoos.list_focoos_models()]
1513
loaded_models = {}
1614
image_examples = [
1715
["fai-rtdetr-l-coco", f"{ASSETS_DIR}/pexels-abby-chung.jpg"],

0 commit comments

Comments
 (0)