Spaces:
Runtime error
Runtime error
Commit
·
455d0fc
1
Parent(s):
c914c36
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,15 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from langchain import PromptTemplate, LLMChain
|
| 3 |
from langchain import HuggingFaceHub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
repo_id = "tiiuae/falcon-7b-instruct"
|
| 6 |
llm = HuggingFaceHub(huggingfacehub_api_token=HUGGINGFACE_API_TOKEN,
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from langchain import PromptTemplate, LLMChain
|
| 3 |
from langchain import HuggingFaceHub
|
| 4 |
+
import os
|
| 5 |
+
from dotenv import load_dotenv
|
| 6 |
+
import chainlit as cl
|
| 7 |
+
|
| 8 |
+
# Load environment variables from .env file
|
| 9 |
+
load_dotenv()
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
HUGGINGFACEHUB_API_TOKEN = os.getenv("HUGGINGFACE_API_TOKEN")
|
| 13 |
|
| 14 |
repo_id = "tiiuae/falcon-7b-instruct"
|
| 15 |
llm = HuggingFaceHub(huggingfacehub_api_token=HUGGINGFACE_API_TOKEN,
|