leilaghomashchi commited on
Commit
b9b58fc
·
verified ·
1 Parent(s): cc2c8c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -291,7 +291,10 @@ def create_interface():
291
  def process_text(text: str, api_key_manual: str = ""):
292
  """پردازش متن"""
293
  # تعیین کلید API - اولویت با manual input
294
- final_api_key = api_key_manual.strip() if api_key_manual.strip() else os.getenv("GROQ_API_KEY")
 
 
 
295
 
296
  if not final_api_key:
297
  return (
 
291
  def process_text(text: str, api_key_manual: str = ""):
292
  """پردازش متن"""
293
  # تعیین کلید API - اولویت با manual input
294
+ if api_key_manual is None:
295
+ api_key_manual = ""
296
+
297
+ final_api_key = api_key_manual.strip() if api_key_manual and api_key_manual.strip() else os.getenv("GROQ_API_KEY")
298
 
299
  if not final_api_key:
300
  return (