Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,17 @@
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
|
|
3 |
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
def format_alpaca_prompt(user_input, system_prompt, history):
|
7 |
"""Formats input in Alpaca/LLaMA style"""
|
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
+
import os
|
4 |
|
5 |
+
# Set up logging
|
6 |
+
logging.basicConfig(level=logging.INFO)
|
7 |
+
|
8 |
+
# Get the API token from the environment variable
|
9 |
+
api_token = os.getenv('HUGGINGFACEHUB_API_TOKEN')
|
10 |
+
|
11 |
+
client = InferenceClient(
|
12 |
+
model="Futuresony/future_ai_12_10_2024.gguf",
|
13 |
+
token=api_token
|
14 |
+
)
|
15 |
|
16 |
def format_alpaca_prompt(user_input, system_prompt, history):
|
17 |
"""Formats input in Alpaca/LLaMA style"""
|