ekinnk commited on
Commit
9454cd3
1 Parent(s): 6ba0343

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +4 -4
main.py CHANGED
@@ -8,13 +8,13 @@ import gradio as gr
8
 
9
  #app = FastAPI()
10
 
11
- pipe_flan = pipeline("text-generation", model="gpt2")
12
 
13
  #@app.get("/infer_gpt2")
14
- def gpt2(input):
15
- output = pipe_flan(input, max_length=130, num_return_sequences=1)
16
  #return {"output": output[0]["generated_text"]}
17
- return {"output": output[0]["generated_text"]}
18
 
19
  #app.mount("/", StaticFiles(directory="static", html=True), name="static")
20
 
 
8
 
9
  #app = FastAPI()
10
 
11
+ #pipe_flan = pipeline("text-generation", model="gpt2")
12
 
13
  #@app.get("/infer_gpt2")
14
+ #def gpt2(input):
15
+ # output = pipe_flan(input, max_length=130, num_return_sequences=1)
16
  #return {"output": output[0]["generated_text"]}
17
+ # return {"output": output[0]["generated_text"]}
18
 
19
  #app.mount("/", StaticFiles(directory="static", html=True), name="static")
20