Former-commit-id: 404f230e35
huggingface
Kye 2 years ago
parent 9f62a83cdd
commit bebe96cd19

@ -0,0 +1,5 @@
# example
from swarms.utils.llm import LLM
llm_instance = LLM(hf_repo_id="google/flan-t5-xl", hf_api_token="your_hf_api_token")
result = llm_instance.run("Who won the FIFA World Cup in 1998?")
print(result)

@ -2,7 +2,9 @@ from typing import Optional
import os
import logging
from langchain import PromptTemplate, HuggingFaceHub, ChatOpenAI, LLMChain
from langchain import PromptTemplate, LLMChain, HuggingFaceHub
from langchain.chat_models import ChatOpenAI
# Configure logging-
logging.basicConfig(level=logging.INFO)

Loading…
Cancel
Save