Migu3low commited on
Commit
66128ec
·
verified ·
1 Parent(s): 86be657

Change the LLM to LLama3

Browse files
Files changed (1) hide show
  1. app.py +11 -28
app.py CHANGED
@@ -4,7 +4,7 @@ from huggingface_hub import InferenceClient
4
  """
5
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
6
  """
7
- client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
8
 
9
 
10
  def respond(
@@ -42,33 +42,16 @@ def respond(
42
  """
43
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
44
  """
45
- with gr.Blocks() as demo:
46
- with gr.Row() as row:
47
-
48
- with gr.Column():
49
-
50
- gr.ChatInterface(
51
- respond,
52
- textbox1=gr.Textbox(placeholder="Enter message here", container=False, scale = 7),
53
- chatbot1=gr.Chatbot(height=400),
54
- additional_inputs=[
55
- gr.Textbox("You are helpful AI", label="System Prompt"),
56
- gr.Slider(500,4000, label="Max New Tokens"),
57
- gr.Slider(0,1, label="Temperature", value= 0.7)
58
- ]
59
- )
60
- with gr.Column():
61
 
62
- gr.ChatInterface(
63
- respond,
64
- textbox2=gr.Textbox(placeholder="Enter message here", container=False, scale = 7),
65
- chatbot2=gr.Chatbot(height=400),
66
- additional_inputs=[
67
- gr.Textbox("You are helpful AI", label="System Prompt"),
68
- gr.Slider(500,4000, label="Max New Tokens"),
69
- gr.Slider(0,1, label="Temperature", value= 0.7)
70
- ]
71
- )
72
-
73
  if __name__ == "__main__":
74
  demo.launch()
 
4
  """
5
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
6
  """
7
+ client = InferenceClient("meta-llama/Meta-Llama-3-8B")
8
 
9
 
10
  def respond(
 
42
  """
43
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
44
  """
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
+ demo = gr.ChatInterface(
47
+ respond,
48
+ textbox1=gr.Textbox(placeholder="Enter message here", container=False, scale = 7),
49
+ chatbot1=gr.Chatbot(height=400),
50
+ additional_inputs=[
51
+ gr.Textbox("You are helpful AI", label="System Prompt"),
52
+ gr.Slider(500,4000, label="Max New Tokens"),
53
+ gr.Slider(0,1, label="Temperature", value= 0.7)
54
+ ]
55
+ )
 
56
  if __name__ == "__main__":
57
  demo.launch()