gnaw05 commited on
Commit
14db4b1
·
verified ·
1 Parent(s): 96d8c6a
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -15,7 +15,11 @@ st.set_page_config(page_title="📑 Contract Analyzer", layout="wide")
15
 
16
  # Tải mô hình Hugging Face từ Hub
17
  def load_inference_client():
18
- return InferenceClient(repo_id="HuggingFaceH4/zephyr-7b-beta") # Mô hình Zephyr
 
 
 
 
19
 
20
  inference_client = load_inference_client()
21
 
 
15
 
16
  # Tải mô hình Hugging Face từ Hub
17
  def load_inference_client():
18
+ try:
19
+ return InferenceClient(repo_id="HuggingFaceH4/zephyr-7b-beta")
20
+ except Exception as e:
21
+ st.error(f"Error loading InferenceClient: {e}")
22
+ return None
23
 
24
  inference_client = load_inference_client()
25