worqhat 0.0.1__py3-none-any.whl → 1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- worqhat/ai_models/image_gen.py +2 -2
- worqhat-1.0.dist-info/METADATA +127 -0
- {worqhat-0.0.1.dist-info → worqhat-1.0.dist-info}/RECORD +6 -6
- worqhat-0.0.1.dist-info/METADATA +0 -18
- {worqhat-0.0.1.dist-info → worqhat-1.0.dist-info}/LICENSE +0 -0
- {worqhat-0.0.1.dist-info → worqhat-1.0.dist-info}/WHEEL +0 -0
- {worqhat-0.0.1.dist-info → worqhat-1.0.dist-info}/top_level.txt +0 -0
worqhat/ai_models/image_gen.py
CHANGED
|
@@ -2,7 +2,7 @@ import requests
|
|
|
2
2
|
import os
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
def generate_image_v2(prompt="", image_style="realistic", output_type="url", orientation="square", api_key=None):
|
|
5
|
+
def generate_image_v2(prompt=[""], image_style="realistic", output_type="url", orientation="square", api_key=None):
|
|
6
6
|
if not api_key:
|
|
7
7
|
api_key = os.getenv("API_KEY")
|
|
8
8
|
if not api_key:
|
|
@@ -21,7 +21,7 @@ def generate_image_v2(prompt="", image_style="realistic", output_type="url", ori
|
|
|
21
21
|
response = requests.post(url, json=payload, headers=headers)
|
|
22
22
|
return response.text
|
|
23
23
|
|
|
24
|
-
def generate_image_v3(prompt=
|
|
24
|
+
def generate_image_v3(prompt=[], image_style="realistic", output_type="url", orientation="square", api_key=None):
|
|
25
25
|
if not api_key:
|
|
26
26
|
api_key = os.getenv("API_KEY")
|
|
27
27
|
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: worqhat
|
|
3
|
+
Version: 1.0
|
|
4
|
+
Summary: A package with all the APIs available from worqHat
|
|
5
|
+
Home-page: https://github.com/Ayush-Kul/worqhat-python
|
|
6
|
+
Author: WorqHat
|
|
7
|
+
Author-email: support@worqhat.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.10
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Provides-Extra: dev
|
|
16
|
+
Requires-Dist: pytest >=7.0 ; extra == 'dev'
|
|
17
|
+
Requires-Dist: twine >=4.0.2 ; extra == 'dev'
|
|
18
|
+
|
|
19
|
+
# WorqHat Python Library
|
|
20
|
+
|
|
21
|
+
The worqhat package is a comprehensive library that allows developers to interact with the WorqHat API. It provides a simple and intuitive interface to access various AI services such as content generation, image generation,text extraction,image analysis and much more. It includes ready-made functions for both AI models and the Database.
|
|
22
|
+
|
|
23
|
+
This library provides convenient access to the WorqHat APIs from Python.
|
|
24
|
+
|
|
25
|
+
To learn how to use the WorqHat APIs,check out our [API Reference](https://docs.worqhat.com/api-reference/authentication)
|
|
26
|
+
and [Documentation](https://docs.worqhat.com/introduction)
|
|
27
|
+
|
|
28
|
+
## Table of Contents
|
|
29
|
+
|
|
30
|
+
- [Worqhat Python Library](#worqhat-python-library)
|
|
31
|
+
- [Table of Contents](#table-of-contents)
|
|
32
|
+
- [Installation](#installation)
|
|
33
|
+
- [Usage](#usage)
|
|
34
|
+
- [Importing Worqhat library](#importing-worqhat-library)
|
|
35
|
+
- [Initializing Worqhat library](#initializing-worqhat-library)
|
|
36
|
+
- [Verifying User Profile](#verifying-user-profile)
|
|
37
|
+
- [Sample Functions](#sample-functions)
|
|
38
|
+
- [Content Moderation with AiCon V2](#content-moderation-with-aicon-v2)
|
|
39
|
+
- [Image Analysis with AiCon V2](#image-analysis-with-aicon-v2)
|
|
40
|
+
- [Documentation](#documentation)
|
|
41
|
+
- [License](#license)
|
|
42
|
+
- [Contributing](#contributing)
|
|
43
|
+
- [Support](#support)
|
|
44
|
+
|
|
45
|
+
## Installation
|
|
46
|
+
|
|
47
|
+
You can install the Worqhat Python Library via pip:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pip install worqhat
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Usage
|
|
54
|
+
|
|
55
|
+
### Importing Worqhat Libary
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
import worqhat
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Initializing Worqhat Library
|
|
62
|
+
|
|
63
|
+
To use the WorqHat library you need to create a .env file which will look like
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
API_KEY="Your API-KEY"
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
You will also need to install and import python-dotenv library and use a load_dotenv object
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
pip install python-dotenv
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
from dotenv import load_dotenv
|
|
77
|
+
|
|
78
|
+
load_dotenv()
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
You can also pass the API_KEY as a parameter to the functions of the library.
|
|
82
|
+
|
|
83
|
+
### Sample Functions
|
|
84
|
+
|
|
85
|
+
#### Content Moderation with AiCon V2
|
|
86
|
+
|
|
87
|
+
```python
|
|
88
|
+
from worqhat.ai_models import content_mod
|
|
89
|
+
from dotenv import load_dotenv
|
|
90
|
+
load_dotenv()
|
|
91
|
+
images=["orange.png"]
|
|
92
|
+
r=content_mod.content_moderation("Hi! How are you")
|
|
93
|
+
print(r)
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
#### Image Analysis with AiCon V2
|
|
98
|
+
|
|
99
|
+
```python
|
|
100
|
+
from worqhat import analyze_images
|
|
101
|
+
from dotenv import load_dotenv
|
|
102
|
+
load_dotenv()
|
|
103
|
+
images=["path-to-image-1","path-to-image-2"]
|
|
104
|
+
r=analyze_images(images,"What is this")
|
|
105
|
+
print(r)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Documentation
|
|
109
|
+
|
|
110
|
+
For detailed documentation, please visit our [official documentation](https://docs.worqhat.com).
|
|
111
|
+
|
|
112
|
+
## License
|
|
113
|
+
|
|
114
|
+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
|
|
115
|
+
|
|
116
|
+
## Contributing
|
|
117
|
+
|
|
118
|
+
We welcome contributions from the community. Please read our contributing guidelines for more information.
|
|
119
|
+
|
|
120
|
+
## Support
|
|
121
|
+
|
|
122
|
+
If you encounter any issues or have any questions, please file an issue on our [GitHub issues page](https://github.com/Ayush-Kul/worqhat-python/issues).
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
This README provides installation instructions, usage examples, links to documentation and license information, as well as details on how to contribute and seek support. Adjust the placeholders (such as `"your-api-key"`, etc.) with your actual values and add more content or sections as needed.
|
|
127
|
+
```
|
|
@@ -3,7 +3,7 @@ worqhat/ai_models/__init__.py,sha256=gP8kLM56glAEqLSk_XKluD7oGzGoXy3ARwyppAwcUUk
|
|
|
3
3
|
worqhat/ai_models/ai_search.py,sha256=G0GWLMYqF40XpH64HKOmVaslANePmvtGUmmqvv7e5rc,1513
|
|
4
4
|
worqhat/ai_models/content_mod.py,sha256=R8LsfejAJrR7dghBgP3baHygFG3nWwH2DqqiCmmJnK0,1594
|
|
5
5
|
worqhat/ai_models/image_analysis.py,sha256=W8Jvnc1JvuAj51aol30te6Dr0jVvHAgRVXsVJmqVXF0,4096
|
|
6
|
-
worqhat/ai_models/image_gen.py,sha256=
|
|
6
|
+
worqhat/ai_models/image_gen.py,sha256=t3UGWpLB-ACJjHxXj7fqk8Z3gpJOV9S92G0eINpiCh4,10543
|
|
7
7
|
worqhat/ai_models/model_train.py,sha256=7JClz73ILoXwgLsoe3Se5TOeAEyZg7ccJOpeksaRJSY,1805
|
|
8
8
|
worqhat/ai_models/text_extract.py,sha256=HWb21hbJX-NVHnCY92x2stx4ophWfOJjTniuHAR2zz4,3180
|
|
9
9
|
worqhat/ai_models/text_gen.py,sha256=S5SNubSeUGZRelu3gZVDRNgRSkgNMDhTbBJzBbL5m0k,6493
|
|
@@ -19,8 +19,8 @@ worqhat/test/test_image_gen.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
|
|
|
19
19
|
worqhat/test/test_model_train.py,sha256=cfcFwjPx-B5UD87ALAc2HNI9iGbZIS_wO73XYCt-LJQ,2158
|
|
20
20
|
worqhat/test/test_text_extract.py,sha256=oohuu2MG4YIGJEzbSmy5NsF0Kx5OCYMn85ueoXNriaU,2693
|
|
21
21
|
worqhat/test/test_text_gen.py,sha256=PkfZOvdPVJ79nPuftKg11rsDCnAt-nkNOKedWZ-xCVs,2783
|
|
22
|
-
worqhat-
|
|
23
|
-
worqhat-
|
|
24
|
-
worqhat-
|
|
25
|
-
worqhat-
|
|
26
|
-
worqhat-
|
|
22
|
+
worqhat-1.0.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
23
|
+
worqhat-1.0.dist-info/METADATA,sha256=l9kEskM4KaN6FsiUnpEGCoNUJGrecLu2YDuOv7Z_QUo,3872
|
|
24
|
+
worqhat-1.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
25
|
+
worqhat-1.0.dist-info/top_level.txt,sha256=7PUf-CeYyg_J3CpNHqxwUFB-rmC4F7Yote1-w3w4tfQ,8
|
|
26
|
+
worqhat-1.0.dist-info/RECORD,,
|
worqhat-0.0.1.dist-info/METADATA
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: worqhat
|
|
3
|
-
Version: 0.0.1
|
|
4
|
-
Summary: A package with all the APIs available from worqHat
|
|
5
|
-
Home-page: https://github.com/Ayush-Kul/worqhat-python
|
|
6
|
-
Author: WorqHat
|
|
7
|
-
Author-email: support@worqhat.com
|
|
8
|
-
License: MIT
|
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
-
Classifier: Operating System :: OS Independent
|
|
12
|
-
Requires-Python: >=3.10
|
|
13
|
-
Description-Content-Type: text/markdown
|
|
14
|
-
License-File: LICENSE
|
|
15
|
-
Provides-Extra: dev
|
|
16
|
-
Requires-Dist: pytest >=7.0 ; extra == 'dev'
|
|
17
|
-
Requires-Dist: twine >=4.0.2 ; extra == 'dev'
|
|
18
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|