Swapnika Dulam commited on
Commit
1d32a2a
·
1 Parent(s): fb72c6e

another change for GPU

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -39,7 +39,7 @@ MODE_INSTRUCTIONS = {
39
  model =None
40
  tokenizer =None
41
  device =None
42
- @spaces.GPU()
43
  def initModel():
44
  global model, device, tokenizer
45
  if model is not None and tokenizer is not None and device is not None:
@@ -80,7 +80,7 @@ def retrieve_context(query, top_k=3):
80
 
81
 
82
  return "\n\n---\n\n".join(retrieved_chunks)
83
-
84
  def generate_response(context, question, retrieved_context, support_type, support_instruction):
85
  initModel()
86
  system_prompt = f"""
 
39
  model =None
40
  tokenizer =None
41
  device =None
42
+
43
  def initModel():
44
  global model, device, tokenizer
45
  if model is not None and tokenizer is not None and device is not None:
 
80
 
81
 
82
  return "\n\n---\n\n".join(retrieved_chunks)
83
+ @spaces.GPU()
84
  def generate_response(context, question, retrieved_context, support_type, support_instruction):
85
  initModel()
86
  system_prompt = f"""