SarowarSaurav commited on
Commit
b319d6f
·
verified ·
1 Parent(s): b69fcd1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -6,7 +6,11 @@ import threading
6
  NUM_BACKEND_SERVERS = 3
7
 
8
  # Initialize backend servers (pipelines) and availability flags
9
- backend_servers = [pipeline("question-answering", model="google-bert/bert-large-uncased-whole-word-masking-finetuned-squad") for _ in range(NUM_BACKEND_SERVERS)]
 
 
 
 
10
  backend_locks = [threading.Lock() for _ in range(NUM_BACKEND_SERVERS)]
11
 
12
  # Function to select a backend server (pipeline) based on availability
 
6
  NUM_BACKEND_SERVERS = 3
7
 
8
  # Initialize backend servers (pipelines) and availability flags
9
+ backend_servers = [
10
+ pipeline("question-answering", model="google-bert/bert-large-uncased-whole-word-masking-finetuned-squad"),
11
+ pipeline("question-answering", model="deepset/roberta-base-squad2"),
12
+ pipeline("question-answering", model="Intel/dynamic_tinybert")
13
+ ] * (NUM_BACKEND_SERVERS // 3)
14
  backend_locks = [threading.Lock() for _ in range(NUM_BACKEND_SERVERS)]
15
 
16
  # Function to select a backend server (pipeline) based on availability