Spaces:
NLPark
/
Runtime error

Severian commited on
Commit
a0013c1
1 Parent(s): dbde5f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -12
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 = "A N I M A - Biomimicry LLM"
6
-
7
  description = """
8
- ANIMA (Advanced Nature Inspired Multidisciplinary Assistant) is an expert in various scientific disciplines, including but not limited to biomimicry, biology, and environmental science.
 
 
 
 
9
  """
10
 
11
  model_path = "Severian/ANIMA-Phi-Neptune-Mistral-7B-gguf"
@@ -71,24 +74,29 @@ additional_inputs=[
71
  )
72
  ]
73
 
74
- character = "Sherlock Holmes"
75
- series = "Arthur Conan Doyle's novel"
 
 
 
 
76
 
77
  iface = gr.ChatInterface(
78
- fn = generater,
79
  title=title,
80
- description = description,
81
  chatbot=chatbot,
82
  additional_inputs=additional_inputs,
83
  examples=[
84
- ["Hello there! How are you doing?"],
85
- ["How many hours does it take a man to eat a Helicopter?"],
86
- ["You are a helpful and honest assistant. Always answer as helpfully as possible. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information."],
87
- ["I want you to act as a spoken English teacher and improver. I will speak to you in English and you will reply to me in English to practice my spoken English. I want you to strictly correct my grammar mistakes, typos, and factual errors. I want you to ask me a question in your reply. Now let's start practicing, you could ask me a question first. Remember, I want you to strictly correct my grammar mistakes, typos, and factual errors."],
88
- [f"I want you to act like {character} from {series}. I want you to respond and answer like {character} using the tone, manner and vocabulary {character} would use. Do not write any explanations. Only answer like {character}. You must know all of the knowledge of {character}."]
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()