Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,7 +37,7 @@ def ContractDraftGPT(user_input, user_name, user_email, user_agent, is_fintech_s
|
|
| 37 |
model="gpt-3.5-turbo",
|
| 38 |
messages=messages
|
| 39 |
)
|
| 40 |
-
|
| 41 |
ContractGPT_reply = response["choices"][0]["message"]["content"].strip()
|
| 42 |
messages.append({"role": "assistant", "content": ContractGPT_reply})
|
| 43 |
|
|
@@ -79,13 +79,14 @@ def get_device_type(user_agent):
|
|
| 79 |
|
| 80 |
def launch_interface():
|
| 81 |
inputs = [
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
|
|
|
| 89 |
outputs = gradio.outputs.Textbox(label="Contract Draft")
|
| 90 |
|
| 91 |
interface = gradio.Interface(fn=ContractDraftGPT, inputs=inputs, outputs=outputs, title="Contract Drafting GPT", description="Generate contract drafts using OpenAI's GPT-3.5 model.")
|
|
|
|
| 37 |
model="gpt-3.5-turbo",
|
| 38 |
messages=messages
|
| 39 |
)
|
| 40 |
+
|
| 41 |
ContractGPT_reply = response["choices"][0]["message"]["content"].strip()
|
| 42 |
messages.append({"role": "assistant", "content": ContractGPT_reply})
|
| 43 |
|
|
|
|
| 79 |
|
| 80 |
def launch_interface():
|
| 81 |
inputs = [
|
| 82 |
+
gradio.inputs.Textbox(label="User Input", placeholder="Provide details for contract draft..."),
|
| 83 |
+
gradio.inputs.Textbox(label="Your Name", placeholder="Enter your name"),
|
| 84 |
+
gradio.inputs.Textbox(label="Your Email", placeholder="Enter your email"),
|
| 85 |
+
gradio.inputs.Textbox(label="User Agent", placeholder="Enter your user agent"),
|
| 86 |
+
gradio.inputs.Radio(label="Are you a fintech startup?", choices=["Yes", "No"]),
|
| 87 |
+
gradio.inputs.Dropdown(label="Select your region:", choices=["England", "Scotland", "Wales", "Northern Ireland"]),
|
| 88 |
+
gradio.inputs.Textbox(label="Profession", placeholder="Enter your profession")
|
| 89 |
+
]
|
| 90 |
outputs = gradio.outputs.Textbox(label="Contract Draft")
|
| 91 |
|
| 92 |
interface = gradio.Interface(fn=ContractDraftGPT, inputs=inputs, outputs=outputs, title="Contract Drafting GPT", description="Generate contract drafts using OpenAI's GPT-3.5 model.")
|