sithumonline commited on
Commit
dbccc7b
1 Parent(s): 3e93048

Rm comments

Browse files
Files changed (1) hide show
  1. app.py +0 -12
app.py CHANGED
@@ -14,16 +14,7 @@ llm = Llama(
14
  n_gpu_layers=50, # change n_gpu_layers if you have more or less VRAM
15
  )
16
 
17
- # history = []
18
 
19
- # system_message = """
20
- # You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.
21
- #
22
- # If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
23
- # """
24
-
25
-
26
- # def generate_text(message, history):
27
  def generate_text(
28
  message,
29
  history: list[tuple[str, str]],
@@ -61,8 +52,6 @@ def generate_text(
61
  temp += stream["choices"][0]["text"]
62
  yield temp
63
 
64
- # history = ["init", input_prompt]
65
-
66
 
67
  demo = gr.ChatInterface(
68
  generate_text,
@@ -93,7 +82,6 @@ demo = gr.ChatInterface(
93
  ],
94
  )
95
 
96
- #demo.queue(concurrency_count=1, max_size=5)?
97
 
98
  if __name__ == "__main__":
99
  demo.launch()
 
14
  n_gpu_layers=50, # change n_gpu_layers if you have more or less VRAM
15
  )
16
 
 
17
 
 
 
 
 
 
 
 
 
18
  def generate_text(
19
  message,
20
  history: list[tuple[str, str]],
 
52
  temp += stream["choices"][0]["text"]
53
  yield temp
54
 
 
 
55
 
56
  demo = gr.ChatInterface(
57
  generate_text,
 
82
  ],
83
  )
84
 
 
85
 
86
  if __name__ == "__main__":
87
  demo.launch()