File size: 724 Bytes
f74da61
f0235ce
 
f74da61
 
 
 
f0235ce
 
 
 
f74da61
 
 
 
f0235ce
 
 
 
 
f74da61
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import gradio as gr
from interaction import LLMResource


"""
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
"""
# client = InferenceClient(
#     "HuggingFaceH4/zephyr-7b-beta",
#     token=os.environ["API_KEY"]
#     )

"""
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
"""
demo = gr.Interface(
    LLMResource.invoke,
    title="Vicky - Wikipedia Chatbot",
    inputs=[gr.Textbox(label="Input Prompt", value="When was Oppenheimer released?")],
    outputs=[gr.Textbox(label="Output")]
)


if __name__ == "__main__":
    demo.launch()