Spaces:
Runtime error
Runtime error
File size: 1,591 Bytes
727303f |
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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
import gradio as gr
import chatmodel as chat
import interpret as shap
import visualize as viz
with gr.Blocks() as ui:
with gr.Row():
gr.Markdown(
"""
# Thesis Demo - AI Chat Application with XAI
### Select between tabs below for the different views.
""")
with gr.Tab("LlaMa 2 ChatBot"):
with gr.Row():
gr.Markdown(
"""
### ChatBot Demo
LlaMa 2 7B Model fine-tuned for chat and transformed to huggingface format (see at [HGF](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf))
""")
with gr.Row():
gr.ChatInterface(chat.interference)
with gr.Tab("SHAP Dashboard"):
with gr.Row():
gr.Markdown(
"""
### SHAP Dashboard
SHAP Visualization Dashboard adopted from [shapash](https://github.com/MAIF/shapash)
""")
with gr.Tab("Visualize Dashboard"):
with gr.Row():
gr.Markdown(
"""
### Visualization Dashboard
Visualization Dashboard adopted from [BERTViz](https://github.com/jessevig/bertviz)
""")
with gr.Tab("LlaMa 2 Model Overview"):
with gr.Row():
gr.Markdown(
"""
### LlaMa 2 Model & Data Overview for Transparency
Adopted from official [model paper](https://arxiv.org/abs/2307.09288) by Meta AI
""")
if __name__ == "__main__":
ui.launch(debug=True) |