Spaces:
Runtime error
Runtime error
Commit
•
a9d318d
1
Parent(s):
eaab10c
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,11 @@
|
|
1 |
import streamlit as st
|
2 |
from langchain import PromptTemplate
|
3 |
from langchain.chains import LLMChain
|
|
|
|
|
4 |
|
|
|
|
|
5 |
# Import your model and template
|
6 |
llm_hf = HuggingFaceHub(
|
7 |
repo_id="tiiuae/falcon-7b-instruct",
|
@@ -9,7 +13,18 @@ llm_hf = HuggingFaceHub(
|
|
9 |
)
|
10 |
|
11 |
restaurant_template = """
|
12 |
-
I want you to become an indian lawyer and enlist me the acts and rights with a one liner description, for every issue i'll raise, you've to only give me relevant acts and rights
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
"""
|
14 |
|
15 |
# Define the Streamlit app
|
@@ -40,4 +55,4 @@ def main():
|
|
40 |
st.warning("Please provide a description of your issue.")
|
41 |
|
42 |
if __name__ == "__main__":
|
43 |
-
main()
|
|
|
1 |
import streamlit as st
|
2 |
from langchain import PromptTemplate
|
3 |
from langchain.chains import LLMChain
|
4 |
+
from langchain.llms import HuggingFaceHub
|
5 |
+
import os
|
6 |
|
7 |
+
os.environ['OPENAI_API_KEY'] = ''
|
8 |
+
os.environ['HUGGINGFACEHUB_API_TOKEN'] = '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'
|
9 |
# Import your model and template
|
10 |
llm_hf = HuggingFaceHub(
|
11 |
repo_id="tiiuae/falcon-7b-instruct",
|
|
|
13 |
)
|
14 |
|
15 |
restaurant_template = """
|
16 |
+
I want you to become an indian lawyer and enlist me the acts and rights with a one liner description, for every issue i'll raise, you've to only give me relevant acts and rights coving from that issue for example:
|
17 |
+
The Indian Contract Act, 1872: This act governs the basic principles of contract law, which includes rent agreements. It sets the legal framework for agreements and their enforceability.
|
18 |
+
|
19 |
+
The Rent Control Act (varies by state): Different Indian states have their own Rent Control Acts that regulate rent agreements, rent control, and tenant-landlord relationships. You should consult the specific Rent Control Act relevant to your location for details.
|
20 |
+
|
21 |
+
Right to Property: As per the Indian Constitution, the right to property is a fundamental right, but it's not absolute. You have the right to enjoy your property and enter into agreements, including rent agreements, as long as it is in compliance with the law.
|
22 |
+
|
23 |
+
Tenant's Rights: Tenants in India also have rights, such as the right to peaceful enjoyment of the rented premises, right to a fair and reasonable rent, and right to notice for eviction. These rights may vary by state.
|
24 |
+
etc.
|
25 |
+
you've to answer me like this for every issue i'll raise,
|
26 |
+
here's the example issue:
|
27 |
+
{issue}
|
28 |
"""
|
29 |
|
30 |
# Define the Streamlit app
|
|
|
55 |
st.warning("Please provide a description of your issue.")
|
56 |
|
57 |
if __name__ == "__main__":
|
58 |
+
main()
|