avi-pipable
commited on
Added a library usage example to generate docs from code snippet.
Browse files
README.md
CHANGED
@@ -49,17 +49,34 @@ The model is open source under apache 2.0. License
|
|
49 |
|
50 |
### Library use
|
51 |
```python
|
52 |
-
pip3 install git+https://github.com/PipableAI/pip-library-parser
|
53 |
-
pip3 install atlassian-python-api
|
|
|
|
|
54 |
import torch
|
55 |
-
torch.set_default_device("cuda")
|
56 |
from pip_library_parser import generate_module_docs
|
57 |
from atlassian.jira import Jira
|
58 |
|
|
|
|
|
|
|
59 |
docs = generate_module_docs(Jira, "atlassian.jira.Jira")
|
60 |
print(docs)
|
61 |
```
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
### Installation
|
64 |
|
65 |
```bash
|
|
|
49 |
|
50 |
### Library use
|
51 |
```python
|
52 |
+
!pip3 install git+https://github.com/PipableAI/pip-library-parser
|
53 |
+
!pip3 install atlassian-python-api
|
54 |
+
|
55 |
+
|
56 |
import torch
|
|
|
57 |
from pip_library_parser import generate_module_docs
|
58 |
from atlassian.jira import Jira
|
59 |
|
60 |
+
|
61 |
+
torch.set_default_device("cuda")
|
62 |
+
|
63 |
docs = generate_module_docs(Jira, "atlassian.jira.Jira")
|
64 |
print(docs)
|
65 |
```
|
66 |
|
67 |
+
```python
|
68 |
+
from pip_library_parser import generate_docstring_from_pip_model
|
69 |
+
|
70 |
+
code_snippet = """
|
71 |
+
def example_function(x):
|
72 |
+
return x * 2
|
73 |
+
"""
|
74 |
+
|
75 |
+
docstring = generate_docstring_from_pip_model(code_snippet)
|
76 |
+
print("Generated Docstring:")
|
77 |
+
print(docstring)
|
78 |
+
```
|
79 |
+
|
80 |
### Installation
|
81 |
|
82 |
```bash
|