Spaces:
Sleeping
Sleeping
File size: 524 Bytes
beca3dc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
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()
|