Repository: gradio-app/gradio

Issue:
theme builder example doesn't work for `3.25.0` or later
### Describe the bug

As mentioned in [Gradio Themeing Guide](https://gradio.app/theming-guide/#using-the-theme-builder) and thanks to #3664 ,
an awesome Gradio theme builder should be executed with

```python
import gradio as gr

gr.themes.builder()
```

But this raises an error in `gradio==3.25.0` or later version with the following message:
```plain
AttributeError: module 'gradio' has no attribute 'documentation'
```

I think the problem is that `gr.documentation` is moved to `gradio_client.documentation` and you mistakenly lost those ones.  

You may change the [following lines](https://github.com/gradio-app/gradio/blob/v3.24.1/gradio/themes/builder.py#L19-L22) from:

```python
docs_theme_core = gr.documentation.document_fn(gr.themes.Base.__init__, gr.themes.Base)[
    1
]
docs_theme_vars = gr.documentation.document_fn(gr.themes.Base.set, gr.themes.Base)[1]
```

to

```python
from gradio_client.documentation import document_fn

docs_theme_core = document_fn(gr.themes.Base.__init__, gr.themes.Base)[
    1
]
docs_theme_vars = document_fn(gr.themes.Base.set, gr.themes.Base)[1]
```

FYI, This also raises an error in [`theme_builder` demo in HF Spaces](https://huggingface.co/spaces/gradio/theme_builder)



### Is there an existing issue for this?

- [X] I have searched the existing issues

### Reproduction

```python
import gradio as gr

gr.themes.builder()
```

### Screenshot

_No response_

### Logs

```shell
Traceback (most recent call last):
  File "demo.py", line 15, in <module>
    gr.themes.builder()
  File "/home/hksong/.virtualenvs/gradio_theme/lib/python3.8/site-packages/gradio/themes/__init__.py", line 14, in builder
    from gradio.themes.builder import demo
  File "/home/hksong/.virtualenvs/gradio_theme/lib/python3.8/site-packages/gradio/themes/builder.py", line 19, in <module>
    docs_theme_core = gr.documentation.document_fn(gr.themes.Base.__init__, gr.themes.Base)[
AttributeError: module 'gradio' has no attribute 'documentation'
```


### System Info

```shell
3.25.0 (or later)
```


### Severity

annoying


Discussion:
Ah you’re right, thanks @deepkyu! Would you like to make a PR to fix this?

Resolving patch:
diff --git a/gradio/__init__.py b/gradio/__init__.py
--- a/gradio/__init__.py
+++ b/gradio/__init__.py
@@ -10,6 +10,8 @@
 from gradio.components import (
     HTML,
     JSON,
+    AnnotatedImage,
+    Annotatedimage,
     Audio,
     BarPlot,
     Button,
@@ -30,8 +32,6 @@
     HighlightedText,
     Highlightedtext,
     Image,
-    AnnotatedImage,
-    Annotatedimage,
     Interpretation,
     Json,
     Label,
diff --git a/gradio/themes/__init__.py b/gradio/themes/__init__.py
--- a/gradio/themes/__init__.py
+++ b/gradio/themes/__init__.py
@@ -13,4 +13,4 @@
 def builder(*args, **kwargs):
     from gradio.themes.builder import demo
 
-    demo.launch(*args, **kwargs)
+    return demo.launch(*args, **kwargs)
diff --git a/gradio/themes/builder.py b/gradio/themes/builder.py
--- a/gradio/themes/builder.py
+++ b/gradio/themes/builder.py
@@ -2,6 +2,8 @@
 import time
 from typing import Iterable
 
+from gradio_client.documentation import document_fn
+
 import gradio as gr
 
 themes = [
@@ -16,10 +18,8 @@
 
 palette_range = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]
 size_range = ["xxs", "xs", "sm", "md", "lg", "xl", "xxl"]
-docs_theme_core = gr.documentation.document_fn(gr.themes.Base.__init__, gr.themes.Base)[
-    1
-]
-docs_theme_vars = gr.documentation.document_fn(gr.themes.Base.set, gr.themes.Base)[1]
+docs_theme_core = document_fn(gr.themes.Base.__init__, gr.themes.Base)[1]
+docs_theme_vars = document_fn(gr.themes.Base.set, gr.themes.Base)[1]
 
 
 def get_docstr(var):


Test patch:
diff --git a/test/test_theme_sharing.py b/test/test_theme_sharing.py
--- a/test/test_theme_sharing.py
+++ b/test/test_theme_sharing.py
@@ -414,3 +414,8 @@ def test_can_make_private(self, mock_1, mock_2, mock_3):
             exist_ok=True,
             private=True,
         )
+
+
+def test_theme_builder_launches():
+    gr.themes.builder(prevent_thread_lock=True)
+    gr.close_all()