JCai commited on
Commit
6d5706b
·
1 Parent(s): b023f8e
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -7,8 +7,14 @@ from typing import Iterable
7
  from gradio.themes.base import Base
8
  from gradio.themes.utils import colors, fonts, sizes
9
 
 
 
 
 
 
 
10
  # Inference client setup
11
- client = InferenceClient("meta-llama/Llama-2-7b-chat-hf")
12
  pipe = pipeline("text-generation", "microsoft/Phi-3-mini-4k-instruct", torch_dtype=torch.bfloat16, device_map="auto")
13
 
14
  # Global flag to handle cancellation
 
7
  from gradio.themes.base import Base
8
  from gradio.themes.utils import colors, fonts, sizes
9
 
10
+ import os
11
+ from dotenv import load_dotenv
12
+ load_dotenv()
13
+
14
+ HF_ACCESS = os.getenv("HF_ACCESS")
15
+
16
  # Inference client setup
17
+ client = InferenceClient(model="mistralai/Mistral-Small-Instruct-2409", api_key=HF_ACCESS)
18
  pipe = pipeline("text-generation", "microsoft/Phi-3-mini-4k-instruct", torch_dtype=torch.bfloat16, device_map="auto")
19
 
20
  # Global flag to handle cancellation