Spaces:
Sleeping
Sleeping
Sagar Sanghani
commited on
Commit
·
73cd47f
1
Parent(s):
73f74f6
working llama
Browse files
model.py
CHANGED
|
@@ -117,7 +117,7 @@ class Model:
|
|
| 117 |
|
| 118 |
if provider == LLMProvider.HUGGINGFACE_LLAMA:
|
| 119 |
llm = HuggingFaceEndpoint(
|
| 120 |
-
repo_id="meta-llama/Llama-
|
| 121 |
huggingfacehub_api_token=api_token,
|
| 122 |
temperature=0
|
| 123 |
)
|
|
@@ -130,16 +130,7 @@ class Model:
|
|
| 130 |
model="gemini-2.5-flash",
|
| 131 |
temperature=0
|
| 132 |
)
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
# # Define the Google Search tool correctly
|
| 136 |
-
# google_search_tool = Tool(
|
| 137 |
-
# name="Google Search",
|
| 138 |
-
# description="Search Google for recent information.",
|
| 139 |
-
# func=search.run, # Use the run method to execute the search directly
|
| 140 |
-
# )
|
| 141 |
-
|
| 142 |
-
# tools.append(google_search_tool)
|
| 143 |
return chat.bind_tools(tools)
|
| 144 |
|
| 145 |
else:
|
|
@@ -211,7 +202,7 @@ def main():
|
|
| 211 |
load_dotenv(find_dotenv())
|
| 212 |
csv = CSVSCache()
|
| 213 |
df = csv.get_all_entries()
|
| 214 |
-
model = Model(LLMProvider.
|
| 215 |
#update_mode(model)
|
| 216 |
test_questions = [0, 6, 10, 12, 15]
|
| 217 |
for row in test_questions:
|
|
|
|
| 117 |
|
| 118 |
if provider == LLMProvider.HUGGINGFACE_LLAMA:
|
| 119 |
llm = HuggingFaceEndpoint(
|
| 120 |
+
repo_id="meta-llama/Llama-3.3-70B-Instruct",
|
| 121 |
huggingfacehub_api_token=api_token,
|
| 122 |
temperature=0
|
| 123 |
)
|
|
|
|
| 130 |
model="gemini-2.5-flash",
|
| 131 |
temperature=0
|
| 132 |
)
|
| 133 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 134 |
return chat.bind_tools(tools)
|
| 135 |
|
| 136 |
else:
|
|
|
|
| 202 |
load_dotenv(find_dotenv())
|
| 203 |
csv = CSVSCache()
|
| 204 |
df = csv.get_all_entries()
|
| 205 |
+
model = Model(LLMProvider.HUGGINGFACE_LLAMA)
|
| 206 |
#update_mode(model)
|
| 207 |
test_questions = [0, 6, 10, 12, 15]
|
| 208 |
for row in test_questions:
|