chillerie commited on
Commit
5b26676
1 Parent(s): 174427d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import gradio as gr
2
  import json
3
  import requests
 
4
  headers = {"Authorization": f"Bearer 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"}
5
  API_URL = "https://api-inference.huggingface.co/models/facebook/bart-large-mnli"
6
  #API_URL = "https://api-inference.huggingface.co/models/microsoft/DialoGPT-large"
@@ -19,6 +20,10 @@ def query(payload):
19
  },
20
  }
21
  """
 
 
 
 
22
  data = {
23
  "inputs": {
24
  "question": payload,
 
1
  import gradio as gr
2
  import json
3
  import requests
4
+ from transformers import pipeline
5
  headers = {"Authorization": f"Bearer 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"}
6
  API_URL = "https://api-inference.huggingface.co/models/facebook/bart-large-mnli"
7
  #API_URL = "https://api-inference.huggingface.co/models/microsoft/DialoGPT-large"
 
20
  },
21
  }
22
  """
23
+
24
+ classifier = pipeline("zero-shot-classification", model="facebook/bart-large-mnli")
25
+
26
+
27
  data = {
28
  "inputs": {
29
  "question": payload,