Spaces:
Runtime error
Runtime error
File size: 410 Bytes
3db8d11 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import gradio as gr
from gradio_client import Client
import os
HUGGINGFACEHUB_API_TOKEN=os.getenv("HUGGINGFACEHUB_API_TOKEN")
client = Client("https://AIShare-aichatbot.hf.space/", hf_token=HUGGINGFACEHUB_API_TOKEN)
def chat_with_model(input_text):
result = client.predict(input_text, fn_index=1)
return result
iface = gr.Interface(fn=chat_with_model, inputs="text", outputs="text")
iface.launch()
|