0ndr3 commited on
Commit
d2a9d8b
·
verified ·
1 Parent(s): b399e09

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -1
app.py CHANGED
@@ -5,7 +5,23 @@ from huggingface_hub import InferenceClient
5
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
6
  """
7
 
8
- client = InferenceClient("AndrewChar/diplom-prod-epoch-4-datast-sber-QA")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  # client = InferenceClient("AlexKay/xlm-roberta-large-qa-multilingual-finedtuned-ru") X
10
  # client = InferenceClient("ruslandev/llama-3-8b-gpt-4o-ru1.0") X
11
  # client = InferenceClient("sambanovasystems/SambaLingo-Russian-Chat") X
 
5
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
6
  """
7
 
8
+ client = InferenceClient(
9
+ provider="hf-inference",
10
+ api_key="hf_xxxxxxxxxxxxxxxxxxxxxxxx"
11
+ )
12
+
13
+ result = client.question_answering(
14
+ model="AlexKay/xlm-roberta-large-qa-multilingual-finedtuned-ru",
15
+ inputs={
16
+ "question": "What is my name?",
17
+ "context": "My name is Clara and I live in Berkeley."
18
+ },
19
+ provider="hf-inference",
20
+ )
21
+
22
+ print(result)
23
+
24
+ # client = InferenceClient("AndrewChar/diplom-prod-epoch-4-datast-sber-QA") X
25
  # client = InferenceClient("AlexKay/xlm-roberta-large-qa-multilingual-finedtuned-ru") X
26
  # client = InferenceClient("ruslandev/llama-3-8b-gpt-4o-ru1.0") X
27
  # client = InferenceClient("sambanovasystems/SambaLingo-Russian-Chat") X