Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,15 +6,15 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStream
|
|
| 6 |
import gradio as gr
|
| 7 |
from threading import Thread
|
| 8 |
|
| 9 |
-
MODEL_LIST = ["
|
| 10 |
HF_TOKEN = os.environ.get("HF_TOKEN", None)
|
| 11 |
MODEL = os.environ.get("MODEL_ID")
|
| 12 |
|
| 13 |
-
TITLE = "<h1><center>KissanAI - Dhenu2 India -
|
| 14 |
|
| 15 |
PLACEHOLDER = """
|
| 16 |
<center>
|
| 17 |
-
<p>Hi, I'm Dhenu. Ask me anything about Agriculture in India.</p>
|
| 18 |
</center>
|
| 19 |
"""
|
| 20 |
|
|
@@ -107,7 +107,7 @@ with gr.Blocks(css=CSS, theme="gradio/soft") as demo:
|
|
| 107 |
additional_inputs_accordion=gr.Accordion(label="⚙️ Parameters", open=False, render=False),
|
| 108 |
additional_inputs=[
|
| 109 |
gr.Textbox(
|
| 110 |
-
value="You are an agriculture assistant in the context of India. Provide precise and actionable response in proper markdown format.",
|
| 111 |
label="System Prompt",
|
| 112 |
render=False,
|
| 113 |
),
|
|
@@ -153,11 +153,10 @@ with gr.Blocks(css=CSS, theme="gradio/soft") as demo:
|
|
| 153 |
),
|
| 154 |
],
|
| 155 |
examples=[
|
|
|
|
| 156 |
["Which type of mango orchards in India require more frequent fruit thinning?"],
|
| 157 |
["How to control black pepper disease through the use of biological control agents in India?"],
|
| 158 |
-
|
| 159 |
-
["What are the government subsidies available for pulses farmers in Telangana?"],
|
| 160 |
-
["Suggested paddy varieties in Kerala and Karnataka."],
|
| 161 |
],
|
| 162 |
cache_examples=False,
|
| 163 |
)
|
|
|
|
| 6 |
import gradio as gr
|
| 7 |
from threading import Thread
|
| 8 |
|
| 9 |
+
MODEL_LIST = ["What is sustainable way for growing cotton in drought pron areas?"]
|
| 10 |
HF_TOKEN = os.environ.get("HF_TOKEN", None)
|
| 11 |
MODEL = os.environ.get("MODEL_ID")
|
| 12 |
|
| 13 |
+
TITLE = "<h1><center>KissanAI - Dhenu2 India - Climate Resilient and Sustainable Agriculture Experimental Model</center></h1>"
|
| 14 |
|
| 15 |
PLACEHOLDER = """
|
| 16 |
<center>
|
| 17 |
+
<p>Hi, I'm Dhenu. Ask me anything about Climate Resilient and Sustainable Agriculture in India.</p>
|
| 18 |
</center>
|
| 19 |
"""
|
| 20 |
|
|
|
|
| 107 |
additional_inputs_accordion=gr.Accordion(label="⚙️ Parameters", open=False, render=False),
|
| 108 |
additional_inputs=[
|
| 109 |
gr.Textbox(
|
| 110 |
+
value="You are an climate resilient and sustainable agriculture assistant in the context of India. Provide precise and actionable response in proper markdown format.",
|
| 111 |
label="System Prompt",
|
| 112 |
render=False,
|
| 113 |
),
|
|
|
|
| 153 |
),
|
| 154 |
],
|
| 155 |
examples=[
|
| 156 |
+
['What is sustainable way for growing cotton in drought-prone areas?'],
|
| 157 |
["Which type of mango orchards in India require more frequent fruit thinning?"],
|
| 158 |
["How to control black pepper disease through the use of biological control agents in India?"],
|
| 159 |
+
|
|
|
|
|
|
|
| 160 |
],
|
| 161 |
cache_examples=False,
|
| 162 |
)
|