Update app.py
Browse files
app.py
CHANGED
|
@@ -2,7 +2,13 @@ import gradio as gr
|
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
|
| 4 |
# Initialize the Hugging Face Inference client
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
|
| 8 |
def respond(
|
|
|
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
|
| 4 |
# Initialize the Hugging Face Inference client
|
| 5 |
+
HF_API_KEY = os.getenv("HF_API_KEY")
|
| 6 |
+
HF_MODEL_NAME = os.getenv("HF_MODEL_NAME")
|
| 7 |
+
|
| 8 |
+
client = InferenceClient(model=HF_MODEL_NAME, token=HF_API_KEY)
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
#client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
| 12 |
|
| 13 |
|
| 14 |
def respond(
|