dwani 0.1.4__py3-none-any.whl → 0.1.6__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.
- dwani/__init__.py +27 -1
- dwani/client.py +30 -17
- dwani/docs.py +95 -16
- dwani/translate.py +26 -0
- dwani-0.1.6.dist-info/METADATA +129 -0
- dwani-0.1.6.dist-info/RECORD +14 -0
- dwani-0.1.4.dist-info/METADATA +0 -70
- dwani-0.1.4.dist-info/RECORD +0 -13
- {dwani-0.1.4.dist-info → dwani-0.1.6.dist-info}/WHEEL +0 -0
- {dwani-0.1.4.dist-info → dwani-0.1.6.dist-info}/licenses/LICENSE +0 -0
- {dwani-0.1.4.dist-info → dwani-0.1.6.dist-info}/top_level.txt +0 -0
dwani/__init__.py
CHANGED
@@ -3,9 +3,11 @@ from .chat import Chat
|
|
3
3
|
from .audio import Audio
|
4
4
|
from .vision import Vision
|
5
5
|
from .asr import ASR
|
6
|
+
from .translate import Translate
|
6
7
|
from .exceptions import DhwaniAPIError
|
8
|
+
from .docs import Documents
|
7
9
|
|
8
|
-
__all__ = ["DhwaniClient", "Chat", "Audio", "Vision", "ASR", "DhwaniAPIError"]
|
10
|
+
__all__ = ["DhwaniClient", "Chat", "Audio", "Vision", "ASR", "DhwaniAPIError", "Translate", "Documents"]
|
9
11
|
|
10
12
|
# Optionally, instantiate a default client for convenience
|
11
13
|
api_key = None
|
@@ -37,3 +39,27 @@ class asr:
|
|
37
39
|
@staticmethod
|
38
40
|
def transcribe(*args, **kwargs):
|
39
41
|
return _get_client().transcribe(*args, **kwargs)
|
42
|
+
|
43
|
+
|
44
|
+
class translate:
|
45
|
+
@staticmethod
|
46
|
+
def run_translate(*args, **kwargs):
|
47
|
+
return _get_client().translate(*args, **kwargs)
|
48
|
+
|
49
|
+
|
50
|
+
class document:
|
51
|
+
@staticmethod
|
52
|
+
def run_ocr(*args, **kwargs):
|
53
|
+
return _get_client().ocr(*args, **kwargs)
|
54
|
+
@staticmethod
|
55
|
+
def run_summarize(*args, **kwargs):
|
56
|
+
return _get_client().summarize(*args, **kwargs)
|
57
|
+
@staticmethod
|
58
|
+
def run_extract(*args, **kwargs):
|
59
|
+
return _get_client().extract(*args, **kwargs)
|
60
|
+
@staticmethod
|
61
|
+
def run_doc_query(*args, **kwargs):
|
62
|
+
return _get_client().doc_query(*args, **kwargs)
|
63
|
+
@staticmethod
|
64
|
+
def run_doc_query_kannada(*args, **kwargs):
|
65
|
+
return _get_client().doc_query_kannada(*args, **kwargs)
|
dwani/client.py
CHANGED
@@ -5,37 +5,50 @@ from .exceptions import DhwaniAPIError
|
|
5
5
|
class DhwaniClient:
|
6
6
|
def __init__(self, api_key=None, api_base=None):
|
7
7
|
self.api_key = api_key or os.getenv("DWANI_API_KEY")
|
8
|
-
self.api_base = api_base or os.getenv("DWANI_API_BASE_URL", "http://localhost:
|
8
|
+
self.api_base = api_base or os.getenv("DWANI_API_BASE_URL", "http://localhost:8000")
|
9
9
|
if not self.api_key:
|
10
10
|
raise ValueError("DHWANI_API_KEY not set")
|
11
11
|
|
12
12
|
def _headers(self):
|
13
13
|
return {"X-API-Key": self.api_key}
|
14
14
|
|
15
|
+
def translate(self, sentences, src_lang, tgt_lang, **kwargs):
|
16
|
+
from .translate import run_translate
|
17
|
+
return run_translate(self, sentences=sentences, src_lang=src_lang, tgt_lang=tgt_lang, **kwargs)
|
18
|
+
|
15
19
|
def chat(self, prompt, src_lang, tgt_lang, **kwargs):
|
16
20
|
from .chat import chat_create
|
17
|
-
return chat_create(self, prompt, src_lang, tgt_lang, **kwargs)
|
18
|
-
|
19
|
-
def speech(self,
|
21
|
+
return chat_create(self, prompt=prompt, src_lang=src_lang, tgt_lang=tgt_lang, **kwargs)
|
22
|
+
|
23
|
+
def speech(self, input, response_format="mp3", **kwargs):
|
20
24
|
from .audio import audio_speech
|
21
|
-
return audio_speech(self,
|
25
|
+
return audio_speech(self, input=input, response_format=response_format, **kwargs)
|
22
26
|
|
23
|
-
def caption(self, file_path, query="describe the image", src_lang="eng_Latn", tgt_lang="kan_Knda"):
|
27
|
+
def caption(self, file_path, query="describe the image", src_lang="eng_Latn", tgt_lang="kan_Knda", **kwargs):
|
24
28
|
from .vision import vision_caption
|
25
|
-
return vision_caption(self, file_path, query, src_lang, tgt_lang)
|
29
|
+
return vision_caption(self, file_path=file_path, query=query, src_lang=src_lang, tgt_lang=tgt_lang, **kwargs)
|
26
30
|
|
27
|
-
def transcribe(self,
|
31
|
+
def transcribe(self, file_path, language=None, **kwargs):
|
28
32
|
from .asr import asr_transcribe
|
29
|
-
return asr_transcribe(self,
|
30
|
-
|
33
|
+
return asr_transcribe(self, file_path=file_path, language=language, **kwargs)
|
34
|
+
|
35
|
+
def document_ocr(self, file_path, language=None, **kwargs):
|
31
36
|
from .docs import document_ocr
|
32
|
-
return document_ocr(self, file_path, language)
|
33
|
-
|
34
|
-
def document_translate(self, file_path, src_lang, tgt_lang):
|
35
|
-
from .docs import document_translate
|
36
|
-
return document_translate(self, file_path, src_lang, tgt_lang)
|
37
|
+
return document_ocr(self, file_path=file_path, language=language, **kwargs)
|
37
38
|
|
38
|
-
def document_summarize(self, file_path,
|
39
|
+
def document_summarize(self, file_path, page_number=1, src_lang="eng_Latn", tgt_lang="kan_Knda", **kwargs):
|
39
40
|
from .docs import document_summarize
|
40
|
-
return document_summarize(self, file_path,
|
41
|
+
return document_summarize(self, file_path, page_number, src_lang, tgt_lang, **kwargs)
|
42
|
+
|
43
|
+
def extract(self, file_path, page_number=1, src_lang="eng_Latn", tgt_lang="kan_Knda", **kwargs):
|
44
|
+
from .docs import extract
|
45
|
+
return extract(self, file_path=file_path, page_number=page_number, src_lang=src_lang,tgt_lang=tgt_lang, **kwargs)
|
46
|
+
|
47
|
+
|
48
|
+
def doc_query( self, file_path, page_number=1, prompt="list the key points", src_lang="eng_Latn", tgt_lang="kan_Knda" , **kwargs ):
|
49
|
+
from .docs import doc_query
|
50
|
+
return doc_query( self, file_path, page_number=page_number, prompt=prompt, src_lang=src_lang, tgt_lang=tgt_lang , **kwargs )
|
41
51
|
|
52
|
+
def doc_query_kannada(self, file_path, page_number=1, prompt="list key points", src_lang="eng_Latn", language=None, **kwargs):
|
53
|
+
from .docs import doc_query_kannada
|
54
|
+
return doc_query_kannada(self, file_path=file_path, page_number=page_number, prompt=prompt, src_lang=src_lang, language=language, **kwargs)
|
dwani/docs.py
CHANGED
@@ -18,17 +18,20 @@ def document_ocr(client, file_path, language=None):
|
|
18
18
|
raise DhwaniAPIError(resp)
|
19
19
|
return resp.json()
|
20
20
|
|
21
|
-
def
|
22
|
-
"""
|
21
|
+
def document_summarize(client, file_path, page_number=1, src_lang="eng_Latn", tgt_lang="kan_Knda"):
|
22
|
+
"""Summarize a PDF document with language and page number options."""
|
23
|
+
url = f"{client.api_base}/v1/indic-summarize-pdf"
|
24
|
+
headers = client._headers()
|
23
25
|
with open(file_path, "rb") as f:
|
24
|
-
files = {"file": f}
|
26
|
+
files = {"file": (file_path, f, "application/pdf")}
|
25
27
|
data = {
|
28
|
+
"page_number": str(page_number),
|
26
29
|
"src_lang": src_lang,
|
27
30
|
"tgt_lang": tgt_lang
|
28
31
|
}
|
29
32
|
resp = requests.post(
|
30
|
-
|
31
|
-
headers=
|
33
|
+
url,
|
34
|
+
headers=headers,
|
32
35
|
files=files,
|
33
36
|
data=data
|
34
37
|
)
|
@@ -36,16 +39,83 @@ def document_translate(client, file_path, src_lang, tgt_lang):
|
|
36
39
|
raise DhwaniAPIError(resp)
|
37
40
|
return resp.json()
|
38
41
|
|
39
|
-
|
40
|
-
|
42
|
+
|
43
|
+
def extract(client, file_path, page_number, src_lang, tgt_lang):
|
44
|
+
"""
|
45
|
+
Extract and translate text from a document (image/PDF) using query parameters.
|
46
|
+
"""
|
47
|
+
# Build the URL with query parameters
|
48
|
+
url = (
|
49
|
+
f"{client.api_base}/v1/indic-extract-text/"
|
50
|
+
f"?page_number={page_number}&src_lang={src_lang}&tgt_lang={tgt_lang}"
|
51
|
+
)
|
52
|
+
headers = client._headers()
|
53
|
+
# 'requests' handles multipart/form-data automatically
|
41
54
|
with open(file_path, "rb") as f:
|
42
|
-
files = {"file": f}
|
43
|
-
|
55
|
+
files = {"file": (file_path, f, "application/pdf")}
|
56
|
+
resp = requests.post(
|
57
|
+
url,
|
58
|
+
headers=headers,
|
59
|
+
files=files
|
60
|
+
)
|
61
|
+
if resp.status_code != 200:
|
62
|
+
raise DhwaniAPIError(resp)
|
63
|
+
return resp.json()
|
64
|
+
|
65
|
+
def doc_query(
|
66
|
+
client,
|
67
|
+
file_path,
|
68
|
+
page_number=1,
|
69
|
+
prompt="list the key points",
|
70
|
+
src_lang="eng_Latn",
|
71
|
+
tgt_lang="kan_Knda"
|
72
|
+
):
|
73
|
+
"""Query a document with a custom prompt and language options."""
|
74
|
+
url = f"{client.api_base}/v1/indic-custom-prompt-pdf"
|
75
|
+
headers = client._headers()
|
76
|
+
with open(file_path, "rb") as f:
|
77
|
+
files = {"file": (file_path, f, "application/pdf")}
|
78
|
+
data = {
|
79
|
+
"page_number": str(page_number),
|
80
|
+
"prompt": prompt,
|
81
|
+
"source_language": src_lang,
|
82
|
+
"target_language": tgt_lang
|
83
|
+
}
|
84
|
+
resp = requests.post(
|
85
|
+
url,
|
86
|
+
headers=headers,
|
87
|
+
files=files,
|
88
|
+
data=data
|
89
|
+
)
|
90
|
+
if resp.status_code != 200:
|
91
|
+
raise DhwaniAPIError(resp)
|
92
|
+
return resp.json()
|
93
|
+
|
94
|
+
|
95
|
+
def doc_query_kannada(
|
96
|
+
client,
|
97
|
+
file_path,
|
98
|
+
page_number=1,
|
99
|
+
prompt="list key points",
|
100
|
+
src_lang="eng_Latn",
|
101
|
+
language=None
|
102
|
+
):
|
103
|
+
"""Summarize a document (image/PDF/text) with custom prompt and language."""
|
104
|
+
url = f"{client.api_base}/v1/indic-custom-prompt-kannada-pdf"
|
105
|
+
headers = client._headers()
|
106
|
+
# 'requests' will handle multipart/form-data automatically
|
107
|
+
with open(file_path, "rb") as f:
|
108
|
+
files = {"file": (file_path, f, "application/pdf")}
|
109
|
+
data = {
|
110
|
+
"page_number": str(page_number),
|
111
|
+
"prompt": prompt,
|
112
|
+
"src_lang": src_lang,
|
113
|
+
}
|
44
114
|
if language:
|
45
115
|
data["language"] = language
|
46
116
|
resp = requests.post(
|
47
|
-
|
48
|
-
headers=
|
117
|
+
url,
|
118
|
+
headers=headers,
|
49
119
|
files=files,
|
50
120
|
data=data
|
51
121
|
)
|
@@ -53,6 +123,8 @@ def document_summarize(client, file_path, language=None):
|
|
53
123
|
raise DhwaniAPIError(resp)
|
54
124
|
return resp.json()
|
55
125
|
|
126
|
+
|
127
|
+
|
56
128
|
class Documents:
|
57
129
|
@staticmethod
|
58
130
|
def ocr(file_path, language=None):
|
@@ -60,11 +132,18 @@ class Documents:
|
|
60
132
|
return _get_client().document_ocr(file_path, language)
|
61
133
|
|
62
134
|
@staticmethod
|
63
|
-
def
|
135
|
+
def summarize(*args, **kwargs):
|
64
136
|
from . import _get_client
|
65
|
-
return _get_client().
|
66
|
-
|
137
|
+
return _get_client().document_summarize(*args, **kwargs)
|
138
|
+
@staticmethod
|
139
|
+
def run_extract(*args, **kwargs):
|
140
|
+
from . import _get_client
|
141
|
+
return _get_client().extract(*args, **kwargs)
|
142
|
+
@staticmethod
|
143
|
+
def run_doc_query(*args, **kwargs):
|
144
|
+
from . import _get_client
|
145
|
+
return _get_client().doc_query(*args, **kwargs)
|
67
146
|
@staticmethod
|
68
|
-
def
|
147
|
+
def run_doc_query_kannada(*args, **kwargs):
|
69
148
|
from . import _get_client
|
70
|
-
return _get_client().
|
149
|
+
return _get_client().doc_query_kannada(*args, **kwargs)
|
dwani/translate.py
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
from .exceptions import DhwaniAPIError
|
2
|
+
import requests
|
3
|
+
|
4
|
+
def run_translate(client, sentences, src_lang, tgt_lang, **kwargs):
|
5
|
+
url = f"{client.api_base}/v1/translate"
|
6
|
+
payload = {
|
7
|
+
"sentences": sentences,
|
8
|
+
"src_lang": src_lang,
|
9
|
+
"tgt_lang": tgt_lang
|
10
|
+
}
|
11
|
+
payload.update(kwargs)
|
12
|
+
resp = requests.post(
|
13
|
+
url,
|
14
|
+
headers={**client._headers(), "Content-Type": "application/json", "accept": "application/json"},
|
15
|
+
json=payload
|
16
|
+
)
|
17
|
+
if resp.status_code != 200:
|
18
|
+
raise DhwaniAPIError(resp)
|
19
|
+
return resp.json()
|
20
|
+
|
21
|
+
class Translate:
|
22
|
+
@staticmethod
|
23
|
+
def run_translate(sentences, src_lang, tgt_lang, **kwargs):
|
24
|
+
from . import _get_client
|
25
|
+
return _get_client().translate(sentences, src_lang, tgt_lang, **kwargs)
|
26
|
+
|
@@ -0,0 +1,129 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: dwani
|
3
|
+
Version: 0.1.6
|
4
|
+
Summary: Multimodal API for Indian languages (Chat, Vision, TTS, ASR, Translate, Docs)
|
5
|
+
Author-email: sachin <python@dwani.ai>
|
6
|
+
License: MIT License
|
7
|
+
|
8
|
+
Copyright (c) 2025 Sachin Shetty
|
9
|
+
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
12
|
+
in the Software without restriction, including without limitation the rights
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
15
|
+
furnished to do so, subject to the following conditions:
|
16
|
+
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
18
|
+
copies or substantial portions of the Software.
|
19
|
+
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26
|
+
SOFTWARE.
|
27
|
+
|
28
|
+
Project-URL: Homepage, https://github.com/dwani-ai/dwani-python
|
29
|
+
Project-URL: Source, https://github.com/dwani-ai/dwani-python
|
30
|
+
Project-URL: Issues, https://github.com/dwani-ai/dwani-python/issues
|
31
|
+
Requires-Python: >=3.8
|
32
|
+
Description-Content-Type: text/markdown
|
33
|
+
License-File: LICENSE
|
34
|
+
Requires-Dist: requests>=2.25.0
|
35
|
+
Dynamic: license-file
|
36
|
+
|
37
|
+
# dwani.ai - python library
|
38
|
+
|
39
|
+
|
40
|
+
### Install the library
|
41
|
+
```bash
|
42
|
+
pip install dwani
|
43
|
+
```
|
44
|
+
|
45
|
+
### Setup the credentials
|
46
|
+
```python
|
47
|
+
import dwani
|
48
|
+
import os
|
49
|
+
|
50
|
+
dwani.api_key = os.getenv("DWANI_API_KEY")
|
51
|
+
|
52
|
+
dwani.api_base = os.getenv("DWANI_API_BASE_URL")
|
53
|
+
```
|
54
|
+
|
55
|
+
### Examples
|
56
|
+
|
57
|
+
#### Text Query
|
58
|
+
```python
|
59
|
+
resp = dwani.Chat.create(prompt="Hello!", src_lang="eng_Latn", tgt_lang="kan_Knda")
|
60
|
+
print(resp)
|
61
|
+
```
|
62
|
+
```json
|
63
|
+
{'response': 'ನಮಸ್ತೆ! ಭಾರತ ಮತ್ತು ಕರ್ನಾಟಕವನ್ನು ಗಮನದಲ್ಲಿಟ್ಟುಕೊಂಡು ಇಂದು ನಿಮ್ಮ ಪ್ರಶ್ನೆಗಳಿಗೆ ನಾನು ನಿಮಗೆ ಹೇಗೆ ಸಹಾಯ ಮಾಡಲಿ?'}
|
64
|
+
```
|
65
|
+
|
66
|
+
|
67
|
+
#### Vision Query
|
68
|
+
```python
|
69
|
+
result = dwani.Vision.caption(
|
70
|
+
file_path="image.png",
|
71
|
+
query="Describe this logo",
|
72
|
+
src_lang="eng_Latn",
|
73
|
+
tgt_lang="kan_Knda"
|
74
|
+
)
|
75
|
+
print(result)
|
76
|
+
```
|
77
|
+
```json
|
78
|
+
{'answer': 'ಒಂದು ವಾಕ್ಯದಲ್ಲಿ ಚಿತ್ರದ ಸಾರಾಂಶವನ್ನು ಇಲ್ಲಿ ನೀಡಲಾಗಿದೆಃ ಪ್ರಕಟಣೆಯ ಅವಲೋಕನವು ಪ್ರಸ್ತುತ ಅರವತ್ತನಾಲ್ಕು ದೇಶಗಳು/ಪ್ರದೇಶಗಳನ್ನು ಸೇರಿಸಲಾಗಿದೆ ಮತ್ತು ಇನ್ನೂ ಹದಿನಾರು ಪ್ರದೇಶಗಳನ್ನು ಸೇರಿಸಬೇಕಾಗಿದೆ. ಒದಗಿಸಲಾದ ಚಿತ್ರದಲ್ಲಿ ಲಾಂಛನವು ಕಾಣಿಸುವುದಿಲ್ಲ.'}
|
79
|
+
```
|
80
|
+
|
81
|
+
#### Speech to Text - Automatic Speech Recognition (ASR)
|
82
|
+
```python
|
83
|
+
result = dwani.ASR.transcribe(file_path="kannada_sample.wav", language="kannada")
|
84
|
+
print(result)
|
85
|
+
```
|
86
|
+
```json
|
87
|
+
{'text': 'ಕರ್ನಾಟಕ ದ ರಾಜಧಾನಿ ಯಾವುದು'}
|
88
|
+
```
|
89
|
+
|
90
|
+
### Translate
|
91
|
+
```python
|
92
|
+
resp = dwani.Translate.run_translate(sentences=["hi"], src_lang="eng_Latn", tgt_lang="kan_Knda")
|
93
|
+
print(resp)
|
94
|
+
```
|
95
|
+
```json
|
96
|
+
{'translations': ['ಹಾಯ್']}
|
97
|
+
```
|
98
|
+
#### Text to Speech - Speech Synthesis
|
99
|
+
|
100
|
+
```python
|
101
|
+
response = dwani.Audio.speech(input="ಕರ್ನಾಟಕ ದ ರಾಜಧಾನಿ ಯಾವುದು", response_format="mp3")
|
102
|
+
with open("output.mp3", "wb") as f:
|
103
|
+
f.write(response)
|
104
|
+
```
|
105
|
+
|
106
|
+
#### Document - Extract Text
|
107
|
+
```python
|
108
|
+
result = dwani.Documents.run_extract(file_path = "dwani-workshop.pdf", page_number=1, src_lang="eng_Latn",tgt_lang="kan_Knda" )
|
109
|
+
print(result)
|
110
|
+
```
|
111
|
+
```json
|
112
|
+
{'pages': [{'processed_page': 1, 'page_content': ' a plain text representation of the document', 'translated_content': 'ಡಾಕ್ಯುಮೆಂಟ್ನ ಸರಳ ಪಠ್ಯ ಪ್ರಾತಿನಿಧ್ಯವನ್ನು ಇಲ್ಲಿ ನೀಡಲಾಗಿದೆ, ಅದನ್ನು ಸ್ವಾಭಾವಿಕವಾಗಿ ಓದುವಂತೆಃ'}]}
|
113
|
+
```
|
114
|
+
|
115
|
+
- Website -> [dwani.ai](https://dwani.ai)
|
116
|
+
|
117
|
+
|
118
|
+
<!--
|
119
|
+
## local development
|
120
|
+
pip install -e .
|
121
|
+
|
122
|
+
|
123
|
+
pip install twine build
|
124
|
+
rm -rf dist/
|
125
|
+
python -m build
|
126
|
+
|
127
|
+
python -m twine upload dist/*
|
128
|
+
|
129
|
+
-->
|
@@ -0,0 +1,14 @@
|
|
1
|
+
dwani/__init__.py,sha256=ldO5OND7DvJlbxaQ0R57Cc73jJTnCSslDDt4I4r-Op8,1895
|
2
|
+
dwani/asr.py,sha256=Y5Mbv1KsvhfXNZacMZycUHPn79NRQC-XPH0j9SYPUSY,590
|
3
|
+
dwani/audio.py,sha256=Q9vw4uBxGy1vQzmiZjZGrY8hkAEQNkGhjz5OcnpFEQQ,888
|
4
|
+
dwani/chat.py,sha256=WFuEShNd4nd6KUbIZTkm3eyPGoP33GepOLJax86nNn8,720
|
5
|
+
dwani/client.py,sha256=OrnwqxBQMfEZ1iQEleFigNujiZve3ox53yv5aSmB3iQ,2849
|
6
|
+
dwani/docs.py,sha256=s7lgw9tfA0IlItAMlwnPuuxMEmS1ls9ygEIgjuUKlcg,4550
|
7
|
+
dwani/exceptions.py,sha256=qEN5ukqlnN7v-kHNEnISWFMpPMt6uTft9mPsTXJ4LVA,227
|
8
|
+
dwani/translate.py,sha256=SH8daC0MLudM3GX3ezoWufNmh1u1Ym4LELiUlWHeyeM,791
|
9
|
+
dwani/vision.py,sha256=JtMSS0hI-8gxtLugVP10__enZsPPy8jheMyWXvrGrdw,1015
|
10
|
+
dwani-0.1.6.dist-info/licenses/LICENSE,sha256=IAD8tbwWZbPWHXgYjabHoMv0aaUzZUYzYiEbfhTCisY,1070
|
11
|
+
dwani-0.1.6.dist-info/METADATA,sha256=A3XIToek1Gj1y4rX8Ipd7-6fEa2kShIjUVl6ZD38j4o,4685
|
12
|
+
dwani-0.1.6.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
13
|
+
dwani-0.1.6.dist-info/top_level.txt,sha256=AM5EhkyuO_EXQFR9JIxEV6tAYMCCyc-a1dLifpCGBUk,6
|
14
|
+
dwani-0.1.6.dist-info/RECORD,,
|
dwani-0.1.4.dist-info/METADATA
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.4
|
2
|
-
Name: dwani
|
3
|
-
Version: 0.1.4
|
4
|
-
Summary: Multimodal API for Indian languages (speech, vision, LLMs, TTS, ASR, etc.)
|
5
|
-
Author-email: sachin <python@dwani.ai>
|
6
|
-
License: MIT License
|
7
|
-
|
8
|
-
Copyright (c) 2025 Sachin Shetty
|
9
|
-
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
11
|
-
of this software and associated documentation files (the "Software"), to deal
|
12
|
-
in the Software without restriction, including without limitation the rights
|
13
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14
|
-
copies of the Software, and to permit persons to whom the Software is
|
15
|
-
furnished to do so, subject to the following conditions:
|
16
|
-
|
17
|
-
The above copyright notice and this permission notice shall be included in all
|
18
|
-
copies or substantial portions of the Software.
|
19
|
-
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26
|
-
SOFTWARE.
|
27
|
-
|
28
|
-
Project-URL: Homepage, https://github.com/dwani-ai/dwani-python
|
29
|
-
Project-URL: Source, https://github.com/dwani-ai/dwani-python
|
30
|
-
Project-URL: Issues, https://github.com/dwani-ai/dwani-python/issues
|
31
|
-
Requires-Python: >=3.8
|
32
|
-
Description-Content-Type: text/markdown
|
33
|
-
License-File: LICENSE
|
34
|
-
Requires-Dist: requests>=2.25.0
|
35
|
-
Dynamic: license-file
|
36
|
-
|
37
|
-
# dwani.ai - python library
|
38
|
-
|
39
|
-
|
40
|
-
```bash
|
41
|
-
pip install dwani
|
42
|
-
```
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
```python
|
47
|
-
import dwani
|
48
|
-
import os
|
49
|
-
|
50
|
-
dwani.api_key = os.getenv("DWANI_API_KEY")
|
51
|
-
|
52
|
-
dwani.api_base = os.getenv("DWANI_API_BASE_URL")
|
53
|
-
|
54
|
-
resp = dwani.Chat.create("Hello!", "eng_Latn", "kan_Knda")
|
55
|
-
print(resp)
|
56
|
-
```
|
57
|
-
|
58
|
-
|
59
|
-
<!--
|
60
|
-
## local development
|
61
|
-
pip install -e .
|
62
|
-
|
63
|
-
|
64
|
-
pip install twine build
|
65
|
-
rm -rf dist/
|
66
|
-
python -m build
|
67
|
-
|
68
|
-
python -m twine upload dist/*
|
69
|
-
|
70
|
-
-->
|
dwani-0.1.4.dist-info/RECORD
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
dwani/__init__.py,sha256=P2pyHkZ7JHn6lHSEbCdV4hjYAwCOXHN3RbsNIU0F5PE,1084
|
2
|
-
dwani/asr.py,sha256=Y5Mbv1KsvhfXNZacMZycUHPn79NRQC-XPH0j9SYPUSY,590
|
3
|
-
dwani/audio.py,sha256=Q9vw4uBxGy1vQzmiZjZGrY8hkAEQNkGhjz5OcnpFEQQ,888
|
4
|
-
dwani/chat.py,sha256=WFuEShNd4nd6KUbIZTkm3eyPGoP33GepOLJax86nNn8,720
|
5
|
-
dwani/client.py,sha256=DmGF93Doibam-rPuV64XlyIwgiWrDJigXZNBCkPz-ho,1601
|
6
|
-
dwani/docs.py,sha256=2B87KqshPl7-2gDJAJxdvcgmPWuC2IQ1FcsDIyeVJPg,2202
|
7
|
-
dwani/exceptions.py,sha256=qEN5ukqlnN7v-kHNEnISWFMpPMt6uTft9mPsTXJ4LVA,227
|
8
|
-
dwani/vision.py,sha256=JtMSS0hI-8gxtLugVP10__enZsPPy8jheMyWXvrGrdw,1015
|
9
|
-
dwani-0.1.4.dist-info/licenses/LICENSE,sha256=IAD8tbwWZbPWHXgYjabHoMv0aaUzZUYzYiEbfhTCisY,1070
|
10
|
-
dwani-0.1.4.dist-info/METADATA,sha256=MZunthMWfUpXPchujVFu20UZDSURcnSd7FRWLt7KCos,2158
|
11
|
-
dwani-0.1.4.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
12
|
-
dwani-0.1.4.dist-info/top_level.txt,sha256=AM5EhkyuO_EXQFR9JIxEV6tAYMCCyc-a1dLifpCGBUk,6
|
13
|
-
dwani-0.1.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|