shohan1010 commited on
Commit
9a2b6ef
·
verified ·
1 Parent(s): 303c53d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -14
app.py CHANGED
@@ -1,18 +1,9 @@
1
  from fastapi import FastAPI
2
- # Use a pipeline as a high-level helper
3
- from transformers import pipeline
4
-
5
- pipe = pipeline("text2text-generation", model="google/flan-t5-base")
6
 
 
7
  app = FastAPI()
8
 
9
-
10
- @app.get('/')
11
- def home():
12
- return {"hello": "Bitfumes"}
13
-
14
-
15
- @app.get('/ask')
16
- def ask(prompt: str):
17
- result = pipe(prompt)
18
- return result[0]
 
1
  from fastapi import FastAPI
 
 
 
 
2
 
3
+ # Create a FastAPI app instance
4
  app = FastAPI()
5
 
6
+ # Define the root endpoint
7
+ @app.get("/")
8
+ def read_root():
9
+ return {"message": "Hello World"}