Ziya-v1 / app.py
Zimix's picture
Update app.py
9599983
raw
history blame
772 Bytes
from fastapi import FastAPI
import gradio as gr
import uvicorn
import socket
from interaction import MindBot
CUSTOM_PATH = "/mindbot/541832"
import os
print('^_^:',os.getenv("AUTH_TOKEN"),'!!!!!!!!!!')
# @app.get("/")
# def read_main():
# return {"message": "This is your main app"}
mind_bot = MindBot(
"Zimix/ziya_v1",
"Zimix/ziya_v1",
if_int8=True
)
# @app.get("/api/mindbot/541832")
# async def chat(query, clear_history=False):
# output = mind_bot.common_generate(query, clear_history)
# return output
# host = socket.gethostbyname(socket.gethostname())
# print(f'demo run on {host}')
demo = mind_bot.new_chat_bot()
demo.launch()
# app = gr.mount_gradio_app(app, demo, path=CUSTOM_PATH)
# uvicorn.run(app, host='192.168.81.9', port=7880)