Spaces:
Sleeping
Sleeping
Update functions_hf.py
Browse files- functions_hf.py +0 -3
functions_hf.py
CHANGED
|
@@ -1,7 +1,5 @@
|
|
| 1 |
from langchain_community.utilities import SQLDatabase
|
| 2 |
from langchain import HuggingFaceHub
|
| 3 |
-
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 4 |
-
import torch
|
| 5 |
from langchain_core.prompts import ChatPromptTemplate
|
| 6 |
from langchain_core.output_parsers import StrOutputParser
|
| 7 |
from langchain_core.runnables import RunnablePassthrough
|
|
@@ -10,7 +8,6 @@ from typing import Dict, List
|
|
| 10 |
|
| 11 |
llm = HuggingFaceHub(repo_id="Qwen/Qwen2.5-72B-Instruct", model_kwargs={"temperature":0, "max_length":64})
|
| 12 |
|
| 13 |
-
|
| 14 |
# Initialize database connection
|
| 15 |
db = SQLDatabase.from_uri("sqlite:///Spring_2025_courses.db", sample_rows_in_table_info=0)
|
| 16 |
|
|
|
|
| 1 |
from langchain_community.utilities import SQLDatabase
|
| 2 |
from langchain import HuggingFaceHub
|
|
|
|
|
|
|
| 3 |
from langchain_core.prompts import ChatPromptTemplate
|
| 4 |
from langchain_core.output_parsers import StrOutputParser
|
| 5 |
from langchain_core.runnables import RunnablePassthrough
|
|
|
|
| 8 |
|
| 9 |
llm = HuggingFaceHub(repo_id="Qwen/Qwen2.5-72B-Instruct", model_kwargs={"temperature":0, "max_length":64})
|
| 10 |
|
|
|
|
| 11 |
# Initialize database connection
|
| 12 |
db = SQLDatabase.from_uri("sqlite:///Spring_2025_courses.db", sample_rows_in_table_info=0)
|
| 13 |
|