Arafath10 commited on
Commit
496ed86
1 Parent(s): 4b32f95

Create main.py

Browse files
Files changed (1) hide show
  1. main.py +19 -0
main.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI, File, UploadFile
2
+ from fastapi.responses import StreamingResponse
3
+ import os
4
+ import io
5
+ temp = open("model/t.txt","w")
6
+ temp.write("aaaaaaaaaaaaa")
7
+ temp.close()
8
+
9
+ temp = open("model/t.txt","r")
10
+
11
+ app = FastAPI()
12
+
13
+
14
+
15
+
16
+ @app.get("/sample")
17
+ def read_root():
18
+ return {"message": str(temp.read())}
19
+