acecalisto3 commited on
Commit
29d8a13
·
verified ·
1 Parent(s): 2fe3235

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -14,10 +14,10 @@ from rich.markdown import Markdown
14
  from rich.traceback import install
15
  install() # Enable rich tracebacks for easier debugging
16
 
17
- # --- Constants ---
18
 
19
- API_URL = "https://api-inference.huggingface.co/models/"
20
- MODEL_NAME = "meta-llama/Meta-Llama-3.1-8B" # Replace with your desired model
21
 
22
  # Chat Interface Parameters
23
  DEFAULT_TEMPERATURE = 0.9
 
14
  from rich.traceback import install
15
  install() # Enable rich tracebacks for easier debugging
16
 
17
+ from huggingface_hub import RepositoryInfo
18
 
19
+ model_info = RepositoryInfo.fetch('huggingface/models/{}/{}'.format(" Meta-Llama-3.1-8B ", MODEL_NAME))
20
+ client = InferenceClient(model_info, token=os.environ.get("HF_TOKEN"))
21
 
22
  # Chat Interface Parameters
23
  DEFAULT_TEMPERATURE = 0.9