richardkimsm89 commited on
Commit
0b95001
·
verified ·
1 Parent(s): 226d228

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -1,10 +1,11 @@
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
 
4
- model_gemma_2 = "google/gemma-2-27b-it"
5
-
6
  client = InferenceClient()
7
 
 
 
 
8
  def fn_gemma_2(
9
  prompt,
10
  history,
@@ -15,14 +16,15 @@ def fn_gemma_2(
15
  top_p,
16
  ):
17
 
18
- # System Prompt
 
 
 
 
19
  #messages = [{"role": "system", "content": system_prompt}]
20
  #history.append(messages[0])
21
  #messages.append({"role": "user", "content": prompt})
22
  #history.append(messages[1])
23
-
24
- messages = [{"role": "user", "content": prompt}]
25
- history.append(messages[0])
26
 
27
  #messages = [
28
  # {
 
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
 
 
 
4
  client = InferenceClient()
5
 
6
+ # Gemma 2
7
+ model_gemma_2 = "google/gemma-2-9b-it"
8
+
9
  def fn_gemma_2(
10
  prompt,
11
  history,
 
16
  top_p,
17
  ):
18
 
19
+ # Without System Prompt
20
+ messages = [{"role": "user", "content": prompt}]
21
+ history.append(messages[0])
22
+
23
+ # With System Prompt
24
  #messages = [{"role": "system", "content": system_prompt}]
25
  #history.append(messages[0])
26
  #messages.append({"role": "user", "content": prompt})
27
  #history.append(messages[1])
 
 
 
28
 
29
  #messages = [
30
  # {