Update app.py
Browse files
app.py
CHANGED
|
@@ -2,10 +2,13 @@ import gradio as gr
|
|
| 2 |
from gpt4all import GPT4All
|
| 3 |
from huggingface_hub import hf_hub_download
|
| 4 |
|
| 5 |
-
title = "
|
| 6 |
-
|
| 7 |
description = """
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
"""
|
| 10 |
|
| 11 |
model_path = "Severian/ANIMA-Phi-Neptune-Mistral-7B-gguf"
|
|
@@ -71,24 +74,29 @@ additional_inputs=[
|
|
| 71 |
)
|
| 72 |
]
|
| 73 |
|
| 74 |
-
|
| 75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
iface = gr.ChatInterface(
|
| 78 |
-
fn
|
| 79 |
title=title,
|
| 80 |
-
description
|
| 81 |
chatbot=chatbot,
|
| 82 |
additional_inputs=additional_inputs,
|
| 83 |
examples=[
|
| 84 |
-
["Hello
|
| 85 |
-
["
|
| 86 |
-
["
|
| 87 |
-
["I
|
| 88 |
-
[
|
| 89 |
]
|
| 90 |
)
|
| 91 |
|
|
|
|
| 92 |
with gr.Blocks(css="resourse/style/custom.css") as demo:
|
| 93 |
chatbot.like(vote, None, None)
|
| 94 |
iface.render()
|
|
|
|
| 2 |
from gpt4all import GPT4All
|
| 3 |
from huggingface_hub import hf_hub_download
|
| 4 |
|
| 5 |
+
title = "ANIMA: Your Biomimicry Guide"
|
|
|
|
| 6 |
description = """
|
| 7 |
+
Welcome to ANIMA, your assistant in exploring the fascinating world of biomimicry.
|
| 8 |
+
I am here to guide you through the principles of biomimicry, helping you understand
|
| 9 |
+
how nature's designs can inspire innovative solutions. Whether you're a student,
|
| 10 |
+
researcher, or just curious about biomimicry, I'm here to assist you.
|
| 11 |
+
Ask me anything from specific examples in nature, to guidance on applying biomimicry principles in your projects.
|
| 12 |
"""
|
| 13 |
|
| 14 |
model_path = "Severian/ANIMA-Phi-Neptune-Mistral-7B-gguf"
|
|
|
|
| 74 |
)
|
| 75 |
]
|
| 76 |
|
| 77 |
+
chatbot = "ANIMA - Biomimicry Guide"
|
| 78 |
+
|
| 79 |
+
additional_inputs = [
|
| 80 |
+
gr.inputs.Dropdown(choices=["General Inquiry", "Specific Organism Query", "Design Challenge Assistance", "Biomimicry Principles", "Project Guidance"], label="Query Type"),
|
| 81 |
+
gr.inputs.CheckboxGroup(choices=["Include Visual Examples", "Provide Detailed Explanations", "Suggest Related Concepts"], label="Additional Options")
|
| 82 |
+
]
|
| 83 |
|
| 84 |
iface = gr.ChatInterface(
|
| 85 |
+
fn=generater,
|
| 86 |
title=title,
|
| 87 |
+
description=description,
|
| 88 |
chatbot=chatbot,
|
| 89 |
additional_inputs=additional_inputs,
|
| 90 |
examples=[
|
| 91 |
+
["Hello ANIMA! Can you tell me how the Namib Desert Beetle inspires water collection methods?"],
|
| 92 |
+
["I'm working on a project related to sustainable architecture. How can biomimicry guide my design process?"],
|
| 93 |
+
["Can you explain the concept of biomimicry and its importance in today’s world?"],
|
| 94 |
+
["I need some ideas for a biomimicry project in my biology class. Can you suggest some organisms to study?"],
|
| 95 |
+
["How does the structure of a lotus leaf help in creating self-cleaning surfaces?"]
|
| 96 |
]
|
| 97 |
)
|
| 98 |
|
| 99 |
+
|
| 100 |
with gr.Blocks(css="resourse/style/custom.css") as demo:
|
| 101 |
chatbot.like(vote, None, None)
|
| 102 |
iface.render()
|