Spaces:
Runtime error
Runtime error
File size: 815 Bytes
a5fe767 16293fe 419cc4a a5fe767 23b564e a5fe767 6ca4b98 a5fe767 a578ab1 a5fe767 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
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("Zimix"),'!!!!!!!!!!')
# @app.get("/")
# def read_main():
# return {"message": "This is your main app"}
# model_name = 'IDEA-CCNL/Ziya-LLaMA-13B-v1'
mind_bot = MindBot(
"Zimix/ziya_v1.1",
"Zimix/ziya_v1.1",
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)
|