MVPilgrim commited on
Commit
32d97e6
·
verified ·
1 Parent(s): 2c02897

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -23,8 +23,13 @@ import pprint
23
  import io
24
  import torch
25
 
 
 
26
 
27
  try:
 
 
 
28
  #############################################
29
  # Logging setup including weaviate logging. #
30
  #############################################
@@ -348,8 +353,8 @@ try:
348
  # Initialize the LLM. #
349
  #######################
350
  #model_path = "/app/llama-2-7b-chat.Q4_0.gguf"
351
- #model_path = "/app/Llama-3.2-3B-Instruct-Q4_0.gguf"
352
- model_path = "Meta-Llama-3.1-8B-Instruct-Q8_0.gguf"
353
  if 'llm' not in st.session_state:
354
  logger.info("### Initializing LLM.")
355
  llm = Llama(model_path,
 
23
  import io
24
  import torch
25
 
26
+ from huggingface_hub import InferenceApi
27
+
28
 
29
  try:
30
+ # Set long session timeout for space.
31
+ inference = InferenceApi(repo_id="MVPilgrim/SemanticSearch", timeout=1800)
32
+
33
  #############################################
34
  # Logging setup including weaviate logging. #
35
  #############################################
 
353
  # Initialize the LLM. #
354
  #######################
355
  #model_path = "/app/llama-2-7b-chat.Q4_0.gguf"
356
+ model_path = "/app/Llama-3.2-3B-Instruct-Q4_0.gguf"
357
+ #model_path = "Meta-Llama-3.1-8B-Instruct-Q8_0.gguf"
358
  if 'llm' not in st.session_state:
359
  logger.info("### Initializing LLM.")
360
  llm = Llama(model_path,