Compare commits
No commits in common. "4b6de15a04e9a622b4c2c4a600a496078e35a1ca" and "066d108e94d5be14a3d93c9d85fa46880a370fa3" have entirely different histories.
4b6de15a04
...
066d108e94
@ -3,11 +3,9 @@ import argparse
|
||||
from appPublic.log import MyLogger, info, debug, warning
|
||||
from appPublic.folderUtils import ProgramPath
|
||||
from appPublic.jsonConfig import getConfig
|
||||
from appPublic.registerfunction import RegisterFunction
|
||||
from ahserver.configuredServer import ConfiguredServer
|
||||
from ahserver.serverenv import ServerEnv
|
||||
from whisper_model import WhisperBase64
|
||||
from asr_engine import generate
|
||||
|
||||
__version__ = '0.0.1'
|
||||
|
||||
@ -30,8 +28,6 @@ if __name__ == '__main__':
|
||||
info(f'========sage version={__version__}========')
|
||||
# server = ConfiguredServer(auth_klass=MyAuthAPI, workdir=workdir)
|
||||
server = ConfiguredServer(workdir=workdir)
|
||||
rf = RegisterFunction()
|
||||
rf.register('generate', generate)
|
||||
g = ServerEnv()
|
||||
g.whisper_model = WhisperBase64()
|
||||
port = args.port or config.website.port or 8080
|
||||
|
@ -1,11 +1,9 @@
|
||||
from appPublic.log import info, debug, warning, error, exception, critical
|
||||
from appPublic.dictObject import DictObject
|
||||
from ahserver.serverenv import ServerEnv
|
||||
from aiohttp.web import StreamResponse
|
||||
|
||||
async def generate(request, **kw):
|
||||
params_kw = kw.get(params_kw, DictObject())
|
||||
model = params_kw.model
|
||||
model = kw.get('model', 'whisper')
|
||||
engine = None
|
||||
g = ServerEnv()
|
||||
if model=='whisper':
|
||||
@ -26,4 +24,6 @@ async def generate(request, **kw):
|
||||
info('response finish')
|
||||
return resp
|
||||
|
||||
rf = RegisterFunction()
|
||||
rf.register('generate', generate)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user