SPIDEY commited on
Commit
3a71388
·
1 Parent(s): 94ffde7

Fix llama cpp issue

Browse files
Files changed (2) hide show
  1. app.py +10 -0
  2. requirements.txt +1 -3
app.py CHANGED
@@ -2,6 +2,16 @@
2
  LegacyScribe — Family Memory Agent
3
  Gradio Space entry point
4
  """
 
 
 
 
 
 
 
 
 
 
5
 
6
  import gradio as gr
7
  import json
 
2
  LegacyScribe — Family Memory Agent
3
  Gradio Space entry point
4
  """
5
+ import subprocess, sys
6
+
7
+ print("Installing llama-cpp-python with CUDA support...")
8
+ subprocess.run([
9
+ sys.executable, "-m", "pip", "install",
10
+ "llama-cpp-python",
11
+ "--extra-index-url", "https://abetlen.github.io/llama-cpp-python/whl/cu122",
12
+ "--no-cache-dir", "-q",
13
+ ], check=True)
14
+ print("llama-cpp-python installed.")
15
 
16
  import gradio as gr
17
  import json
requirements.txt CHANGED
@@ -1,4 +1,2 @@
1
- # requirements.txt
2
  gradio>=4.0.0
3
- huggingface_hub
4
- llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu122
 
 
1
  gradio>=4.0.0
2
+ huggingface_hub