zerostratos commited on
Commit
1c98a2f
·
verified ·
1 Parent(s): 82e1706

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1,15 +1,15 @@
1
  import gradio as gr
2
- from llama_cpp import Llama
3
-
4
  # Load the model
5
- llm = Llama.from_pretrained(
6
  repo_id="Viet-Mistral/Vistral-7B-Chat"
7
  # filename="models-7B-F16.gguf"
8
  )
9
 
10
  # Define the function to interact with the model
11
  def chat_with_model(user_input):
12
- response = llm.create_chat_completion(
13
  messages=[
14
  {"role": "user", "content": user_input}
15
  ]
 
1
  import gradio as gr
2
+ #from llama_cpp import Llama
3
+ from transformers import AutoModelForCausalLM
4
  # Load the model
5
+ llm = AutoModelForCausalLM.from_pretrained(
6
  repo_id="Viet-Mistral/Vistral-7B-Chat"
7
  # filename="models-7B-F16.gguf"
8
  )
9
 
10
  # Define the function to interact with the model
11
  def chat_with_model(user_input):
12
+ response = llm.generate(
13
  messages=[
14
  {"role": "user", "content": user_input}
15
  ]