esama commited on
Commit
315e1ab
·
verified ·
1 Parent(s): 2d31318

المساعد الذكي

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -1,11 +1,8 @@
1
- import os
2
  from huggingface_hub import InferenceClient
3
 
4
- # جلب التوكن من Hugging Face secrets
5
- hf_api_key = os.getenv('HF_API_KEY') # هذا هو اسم الـ secret الذي وضعته
6
-
7
- # تفعيل الـ client باستخدام التوكن
8
- client = InferenceClient(hf_api_key)
9
 
10
  def respond(
11
  message,
@@ -55,4 +52,4 @@ demo = gr.ChatInterface(
55
  )
56
 
57
  if __name__ == "__main__":
58
- demo.launch()
 
1
+ import gradio as gr
2
  from huggingface_hub import InferenceClient
3
 
4
+ # استبدل "HuggingFaceH4/zephyr-7b-beta" بالموديل اللي تحب تستخدمه إذا أردت
5
+ client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
 
 
 
6
 
7
  def respond(
8
  message,
 
52
  )
53
 
54
  if __name__ == "__main__":
55
+ demo.launch()