File size: 365 Bytes
4159dc2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import gradio as gr
from fastapi import FastAPI
import uvicorn
app = FastAPI()
with gr.Blocks(fill_height=True) as demo:
text = gr.Textbox();
@app.get("/v1/embeddings")
def test():
return {"test": True}
GradioApp = gr.mount_gradio_app(app, demo, path="");
uvicorn.run(GradioApp, port=7860, host="0.0.0.0")
|