Patrick079 commited on
Commit
86aced4
·
verified ·
1 Parent(s): 90335d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -42,7 +42,7 @@ def chat_short_story(length, genre, theme, tone, writing_style):
42
 
43
  # Initialize the Hugging Face Inference Client
44
  try:
45
- client = InferenceClient(api_key=HUGGINGFACE_API_KEY)
46
  except Exception as e:
47
  return f"Error: Failed to initialize Hugging Face client. Details: {e}"
48
 
 
42
 
43
  # Initialize the Hugging Face Inference Client
44
  try:
45
+ client = InferenceClient(api_key=HUGGINGFACE_API_KEY).strip()
46
  except Exception as e:
47
  return f"Error: Failed to initialize Hugging Face client. Details: {e}"
48