WingNeville commited on
Commit
4adf2aa
·
verified ·
1 Parent(s): 1b21bef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -6,7 +6,8 @@ import gradio as gr
6
  def test_api_connection(query: str, api_key: str) -> str:
7
  """Tests the Hugging Face Inference API connection with the provided API key."""
8
  try:
9
- client = InferenceClient(model="distilbert-base-uncased-finetuned-sst-2-english", token=api_key)
 
10
  response = client.text_classification(query)
11
  return f"API connection successful! Response: {response}"
12
  except Exception as e:
 
6
  def test_api_connection(query: str, api_key: str) -> str:
7
  """Tests the Hugging Face Inference API connection with the provided API key."""
8
  try:
9
+ # Using a different model for testing
10
+ client = InferenceClient(model="distilbert-base-uncased", token=api_key)
11
  response = client.text_classification(query)
12
  return f"API connection successful! Response: {response}"
13
  except Exception as e: