dali4444444 commited on
Commit
7627fe9
·
verified ·
1 Parent(s): bc3af55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py CHANGED
@@ -2,7 +2,21 @@ import gradio as gr
2
  import os
3
  from huggingface_hub import hf_hub_download
4
  from llama_cpp import Llama
 
 
5
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  HF_TOKEN = os.environ.get("HF_TOKEN")
7
 
8
  SYSTEM_PROMPT = """Tu es l'assistant SAV officiel du Centre Chery Tunisie.
 
2
  import os
3
  from huggingface_hub import hf_hub_download
4
  from llama_cpp import Llama
5
+ import subprocess
6
+ import sys
7
 
8
+
9
+ subprocess.run([
10
+ sys.executable, "-m", "pip", "install",
11
+ "llama-cpp-python",
12
+ "--extra-index-url", "https://abetlen.github.io/llama-cpp-python/whl/cpu",
13
+ "--quiet"
14
+ ], check=True)
15
+
16
+ import gradio as gr
17
+ import os
18
+ from huggingface_hub import hf_hub_download
19
+ from llama_cpp import Llama
20
  HF_TOKEN = os.environ.get("HF_TOKEN")
21
 
22
  SYSTEM_PROMPT = """Tu es l'assistant SAV officiel du Centre Chery Tunisie.