deadshot2003 commited on
Commit
ddbeca3
·
verified ·
1 Parent(s): 02a1894

Delete main.py

Browse files
Files changed (1) hide show
  1. main.py +0 -22
main.py DELETED
@@ -1,22 +0,0 @@
1
- from transformers import pipeline
2
- import gradio as gr
3
- from fastapi import FastAPI
4
-
5
- app = FastAPI()
6
-
7
- chatbot = pipeline(model="facebook/blenderbot-400M-distill")
8
-
9
- def DS_chatbot(message):
10
- conversation = chatbot(message)
11
- return conversation[0]['generated_text']
12
-
13
- io = gr.Interface(DS_chatbot, "textbox", "textbox", title="Chatbot", description="Enter text to start chatting.")
14
-
15
- @app.get("/")
16
- def read_main():
17
- return {"message": "This is your main app"}
18
-
19
- # Define a custom path for the Gradio interface
20
- CUSTOM_PATH = "/gradio"
21
- # Mount the Gradio app onto the FastAPI app
22
- app = gr.mount_gradio_app(app, io, path=CUSTOM_PATH)