M17idd commited on
Commit
240cc48
·
1 Parent(s): 7561e49

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -5
app.py CHANGED
@@ -380,14 +380,21 @@ st.markdown("""
380
  """, unsafe_allow_html=True)
381
 
382
  # ---------- مدل زبانی ----------
383
- llm = ChatOpenAI(
384
- base_url="https://api.together.xyz/v1",
385
- api_key='0291f33aee03412a47fa5d8e562e515182dcc5d9aac5a7fb5eefdd1759005979',
386
- model="meta-llama/Llama-3.3-70B-Instruct-Turbo-Free",
387
 
388
- )
 
 
389
 
390
 
 
 
 
 
 
391
  # ---------- ورودی جستجو ----------
392
  st.markdown("""
393
  <style>
 
380
  """, unsafe_allow_html=True)
381
 
382
  # ---------- مدل زبانی ----------
383
+ # llm = ChatOpenAI(
384
+ # base_url="https://api.together.xyz/v1",
385
+ # api_key='0291f33aee03412a47fa5d8e562e515182dcc5d9aac5a7fb5eefdd1759005979',
386
+ # model="meta-llama/Llama-3.3-70B-Instruct-Turbo-Free",
387
 
388
+ # )
389
+ from transformers import pipeline
390
+ hf_api_key = os.getenv("tavana55")
391
 
392
 
393
+ # تعیین مدل مورد نظر
394
+ model_name = "meta-llama/Llama-3.3-70B-Instruct-Turbo-Free"
395
+
396
+ llm = pipeline("text-generation", model=model_name, use_auth_token=hf_api_key)
397
+
398
  # ---------- ورودی جستجو ----------
399
  st.markdown("""
400
  <style>