koushikroy commited on
Commit
4bdd319
·
verified ·
1 Parent(s): 5e497d6

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -1,7 +1,11 @@
1
  from fastapi import FastAPI
 
2
 
3
  app = FastAPI()
4
 
 
 
 
5
  @app.get("/")
6
  async def root():
7
  return {"message": "Hello World"}
 
1
  from fastapi import FastAPI
2
+ from transformers import pipeline
3
 
4
  app = FastAPI()
5
 
6
+ # Initialize the text generation pipeline
7
+ pipe = pipeline("text2text-generation", model="google/flan-t5-small")
8
+
9
  @app.get("/")
10
  async def root():
11
  return {"message": "Hello World"}