Demosthene-OR commited on
Commit
2eb8138
1 Parent(s): 1fcfbbe

Update main_dl.py

Browse files
Files changed (1) hide show
  1. main_dl.py +3 -2
main_dl.py CHANGED
@@ -2,6 +2,7 @@ from fastapi import FastAPI, HTTPException, Header, Depends, Request, Response
2
  from fastapi.responses import JSONResponse
3
  from fastapi.security import HTTPBasic, HTTPBasicCredentials
4
  from fastapi.exceptions import RequestValidationError
 
5
  from typing import Optional, List
6
  from pydantic import BaseModel, ValidationError
7
  import pandas as pd
@@ -36,7 +37,7 @@ def load_vocab(file_path):
36
  return file.read().split('\n')[:-1]
37
 
38
 
39
- def decode_sequence_rnn(input_sentence, src, tgt):
40
  global translation_model
41
 
42
  vocab_size = 15000
@@ -173,7 +174,7 @@ class PositionalEmbedding(layers.Layer):
173
  })
174
  return config
175
 
176
- def decode_sequence_tranf(input_sentence, src, tgt):
177
  global translation_model
178
 
179
  vocab_size = 15000
 
2
  from fastapi.responses import JSONResponse
3
  from fastapi.security import HTTPBasic, HTTPBasicCredentials
4
  from fastapi.exceptions import RequestValidationError
5
+ import asyncio
6
  from typing import Optional, List
7
  from pydantic import BaseModel, ValidationError
8
  import pandas as pd
 
37
  return file.read().split('\n')[:-1]
38
 
39
 
40
+ async def decode_sequence_rnn(input_sentence, src, tgt):
41
  global translation_model
42
 
43
  vocab_size = 15000
 
174
  })
175
  return config
176
 
177
+ async def decode_sequence_tranf(input_sentence, src, tgt):
178
  global translation_model
179
 
180
  vocab_size = 15000