Vitrous commited on
Commit
c27c7f2
·
verified ·
1 Parent(s): 6c83ad5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -37,8 +37,6 @@ def load_quantized_model(model_id, model_basename):
37
  # Making the code device-agnostic
38
  model, tokenizer = load_quantized_model(model_name_or_path, "model.safetensors")
39
 
40
-
41
-
42
  def load_model_norm():
43
  if torch.cuda.is_available():
44
  print("CUDA is available. GPU will be used.")
@@ -59,6 +57,7 @@ def load_model_norm():
59
 
60
 
61
  # Function to generate a response using the model
 
62
  def generate_response(prompt: str) -> str:
63
  PERSONA_NAME = "Ivana"
64
  PERSONA_DESC = f"""PROMPT_TEMPLATE_START
@@ -99,6 +98,7 @@ def generate_response(prompt: str) -> str:
99
 
100
 
101
 
 
102
  @app.get("/", tags=["Home"])
103
  async def api_home():
104
  return {'detail': 'Welcome to Eren Bot!'}
 
37
  # Making the code device-agnostic
38
  model, tokenizer = load_quantized_model(model_name_or_path, "model.safetensors")
39
 
 
 
40
  def load_model_norm():
41
  if torch.cuda.is_available():
42
  print("CUDA is available. GPU will be used.")
 
57
 
58
 
59
  # Function to generate a response using the model
60
+
61
  def generate_response(prompt: str) -> str:
62
  PERSONA_NAME = "Ivana"
63
  PERSONA_DESC = f"""PROMPT_TEMPLATE_START
 
98
 
99
 
100
 
101
+
102
  @app.get("/", tags=["Home"])
103
  async def api_home():
104
  return {'detail': 'Welcome to Eren Bot!'}