Anshofgodkrishna commited on
Commit
bed8522
·
verified ·
1 Parent(s): 0d675cf

Create requirements.txt

Browse files

import gradio as gr
from huggingface_hub import hf_hub_download
from llama_cpp import Llama

# 1. आपकी GGUF फाइल को Hugging Face से डाउनलोड करना
# Note: अगर आपने GGUF अपलोड कर दी है, तो उसका नाम यहाँ लिखें
model_path = hf_hub_download(repo_id="Anshofgodkrishna/Harsh_AI_7B_Final", filename="Qwen2.5-7B.Q4_K_M.gguf")

# 2. मॉडल लोड करना
llm = Llama(model_path=model_path, n_ctx=2048)

# 3. चैट फंक्शन
def respond(message, history):
prompt = f"### Instruction: You are Harsh AI.\n### Input: {message}\n### Output:"
output = llm(prompt, max_tokens=150)
return output['choices'][0]['text']

# 4. इंटरफेस लॉन्च करना
gr.ChatInterface(respond).launch()

Files changed (1) hide show
  1. requirements.txt +3 -0
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ gradio
2
+ huggingface_hub
3
+ llama-cpp-python