Skip to content

Commit 664a343

Browse files
authored
Fix AllenNLP QA example and update Inference API to use main repo
* fix AllenNLP QA example * update AllenNLP, AllenNLP Models
1 parent 82c105f commit 664a343

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
starlette==0.14.2
22
numpy==1.20.2
3+
allennlp>=2.5.0,<3.0.0
34
# Even though it is not imported, it is actually required.
4-
allennlp_models
5-
-e git://github.com/LysandreJik/allennlp@hf_hub#egg=allennlp
5+
allennlp_models>=2.5.0,<3.0.0
66
huggingface_hub==0.0.8

interfaces/Libraries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const allennlpQuestionAnswering = (model: ModelData) =>
8989
`import allennlp_models
9090
from allennlp.predictors.predictor import Predictor
9191
92-
predictor = Predictor.from_path("${model.modelId}")
92+
predictor = Predictor.from_path("hf://${model.modelId}")
9393
predictor_input = {"passage": "My name is Wolfgang and I live in Berlin", "question": "Where do I live?"}
9494
predictions = predictor.predict_json(predictor_input)`;
9595

0 commit comments

Comments
 (0)