DebabrataHalder commited on
Commit
3fdb9fc
·
verified ·
1 Parent(s): c8e03c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -1,11 +1,12 @@
1
  import gradio as gr
2
  from llama_cpp import Llama
3
 
4
- # Point to the model file. If you've uploaded it in your Space repo, it should be in the repo root.
5
- model_path = "mysqlmodel/mysqlmodel.gguf"
6
-
7
- # Initialize the model. Adjust parameters (like n_ctx) as needed.
8
- llm = Llama(model_path=model_path, n_ctx=2048)
 
9
 
10
  def chat(prompt):
11
  # Generate a response using the model
 
1
  import gradio as gr
2
  from llama_cpp import Llama
3
 
4
+ # Load the model directly from your Hugging Face repository
5
+ llm = Llama.from_pretrained(
6
+ repo_id="DebabrataHalder/mysqlmodel",
7
+ filename="mysqlmodel.gguf",
8
+ n_ctx=2048 # adjust context size if needed
9
+ )
10
 
11
  def chat(prompt):
12
  # Generate a response using the model