Update app.py
Browse files
app.py
CHANGED
|
@@ -22,7 +22,7 @@ def get_user_ip():
|
|
| 22 |
except:
|
| 23 |
return None
|
| 24 |
|
| 25 |
-
def CustomChatGPT(user_input, user_name, user_email, user_agent):
|
| 26 |
messages = []
|
| 27 |
|
| 28 |
if not user_name:
|
|
@@ -51,7 +51,6 @@ def CustomChatGPT(user_input, user_name, user_email, user_agent):
|
|
| 51 |
interaction_patterns = "" # Track user interface interaction patterns
|
| 52 |
success_of_advice = "" # Measure success of advice
|
| 53 |
user_satisfaction_rate = "" # Measure user satisfaction rate
|
| 54 |
-
user_location = "" # Capture user location
|
| 55 |
industry_or_profession = "" # Capture user industry or profession
|
| 56 |
|
| 57 |
record = {
|
|
@@ -97,7 +96,8 @@ def launch_interface():
|
|
| 97 |
inputs = [
|
| 98 |
gradio.inputs.Textbox(label="User Input", placeholder="Talk to your attorney..."),
|
| 99 |
gradio.inputs.Textbox(label="Your Name", placeholder="Enter your name"),
|
| 100 |
-
gradio.inputs.Textbox(label="Your Email", placeholder="Enter your email")
|
|
|
|
| 101 |
]
|
| 102 |
outputs = gradio.outputs.Textbox(label="Our AI attorney Reply")
|
| 103 |
|
|
|
|
| 22 |
except:
|
| 23 |
return None
|
| 24 |
|
| 25 |
+
def CustomChatGPT(user_input, user_name, user_email, user_location, user_agent):
|
| 26 |
messages = []
|
| 27 |
|
| 28 |
if not user_name:
|
|
|
|
| 51 |
interaction_patterns = "" # Track user interface interaction patterns
|
| 52 |
success_of_advice = "" # Measure success of advice
|
| 53 |
user_satisfaction_rate = "" # Measure user satisfaction rate
|
|
|
|
| 54 |
industry_or_profession = "" # Capture user industry or profession
|
| 55 |
|
| 56 |
record = {
|
|
|
|
| 96 |
inputs = [
|
| 97 |
gradio.inputs.Textbox(label="User Input", placeholder="Talk to your attorney..."),
|
| 98 |
gradio.inputs.Textbox(label="Your Name", placeholder="Enter your name"),
|
| 99 |
+
gradio.inputs.Textbox(label="Your Email", placeholder="Enter your email"),
|
| 100 |
+
gradio.inputs.Dropdown(label="Your Location (US State)", choices=["Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming"])
|
| 101 |
]
|
| 102 |
outputs = gradio.outputs.Textbox(label="Our AI attorney Reply")
|
| 103 |
|