DesiredName commited on
Commit
65f1222
·
verified ·
1 Parent(s): adbc6cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -11,9 +11,9 @@ app = FastAPI()
11
  def greet_json():
12
  return {"Hello": "World!"}
13
 
14
- @app.get("/message?input={prompt}")
15
- def message(prompt: str):
16
- inputs = tokenizer(prompt, return_tensors="pt", padding=True, truncation=True)
17
  output = model.generate(
18
  input_ids=inputs["input_ids"],
19
  attention_mask=inputs["attention_mask"],
 
11
  def greet_json():
12
  return {"Hello": "World!"}
13
 
14
+ @app.get("/message)
15
+ async def message(input: str):
16
+ inputs = tokenizer(input, return_tensors="pt", padding=True, truncation=True)
17
  output = model.generate(
18
  input_ids=inputs["input_ids"],
19
  attention_mask=inputs["attention_mask"],