Roger Condori commited on
Commit
3281b8a
β€’
1 Parent(s): 9aee0fd

Fixed version llama cpp python

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -5,10 +5,10 @@ try:
5
  except:
6
  if torch.cuda.is_available():
7
  print("CUDA is available on this system.")
8
- os.system('CMAKE_ARGS="-DLLAMA_CUBLAS=on" FORCE_CMAKE=1 pip install llama-cpp-python --force-reinstall --upgrade --no-cache-dir --verbose')
9
  else:
10
  print("CUDA is not available on this system.")
11
- os.system('pip install llama-cpp-python')
12
 
13
  import gradio as gr
14
  from langchain.embeddings.openai import OpenAIEmbeddings
@@ -51,7 +51,7 @@ title = """
51
  <div style="text-align: center;max-width: 1500px;">
52
  <h2>Chat with Documents πŸ“š - Falcon, Llama-2 and OpenAI</h2>
53
  <p style="text-align: center;">Upload txt, pdf, doc, docx, enex, epub, html, md, odt, ptt and pttx.
54
- Wait for the Status to show Loaded documents, start typing your questions. Oficial Repository <a href="https://github.com/R3gm/ConversaDocs">ConversaDocs</a>.<br /></p>
55
  </div>
56
  """
57
 
 
5
  except:
6
  if torch.cuda.is_available():
7
  print("CUDA is available on this system.")
8
+ os.system('CMAKE_ARGS="-DLLAMA_CUBLAS=on" FORCE_CMAKE=1 pip install llama-cpp-python==0.1.78 --force-reinstall --upgrade --no-cache-dir --verbose')
9
  else:
10
  print("CUDA is not available on this system.")
11
+ os.system('pip install llama-cpp-python==0.1.78')
12
 
13
  import gradio as gr
14
  from langchain.embeddings.openai import OpenAIEmbeddings
 
51
  <div style="text-align: center;max-width: 1500px;">
52
  <h2>Chat with Documents πŸ“š - Falcon, Llama-2 and OpenAI</h2>
53
  <p style="text-align: center;">Upload txt, pdf, doc, docx, enex, epub, html, md, odt, ptt and pttx.
54
+ Wait for the Status to show Loaded documents, start typing your questions. This DEMO uses Falcon 7B, so the answers may not be optimal. You can use the Colab with GPU and Llama2 to have high-quality responses. Oficial Repository <a href="https://github.com/R3gm/ConversaDocs">ConversaDocs</a>.<br /></p>
55
  </div>
56
  """
57