Spaces:
Sleeping
Sleeping
import os | |
import gradio as gr | |
from huggingface_hub import InferenceClient | |
api_key = os.environ["HF_API_KEY"] | |
client = InferenceClient( | |
"mistralai/Mixtral-8x7B-Instruct-v0.1", | |
token=api_key | |
) | |
def my_special_feature(user_input): | |
processed = f"[Rudra’s Feature] {user_input}" | |
response = client.text_generation(processed, max_new_tokens=200) | |
return f"🎉 {response}" | |
demo = gr.Interface( | |
fn=my_special_feature, | |
inputs="text", | |
outputs="text", | |
title="Rudra's Fox Parade" | |
) | |
demo.launch() | |