Upload app.py
Browse files
app.py
CHANGED
|
@@ -115,8 +115,8 @@ def predict(user_input,company):
|
|
| 115 |
|
| 116 |
|
| 117 |
# Get response from the LLM
|
| 118 |
-
|
| 119 |
-
print (
|
| 120 |
|
| 121 |
# While the prediction is made, log both the inputs and outputs to a local log file
|
| 122 |
# While writing to the log file, ensure that the commit scheduler is locked to avoid parallel
|
|
@@ -137,8 +137,12 @@ def predict(user_input,company):
|
|
| 137 |
|
| 138 |
# Set-up the Gradio UI
|
| 139 |
user_input = gr.Textbox (label = 'Query')
|
| 140 |
-
company_input = gr.Dropdown(
|
| 141 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 142 |
|
| 143 |
# Add text box and radio button to the interface
|
| 144 |
# The radio button is used to select the company 10k report in which the context needs to be retrieved.
|
|
|
|
| 115 |
|
| 116 |
|
| 117 |
# Get response from the LLM
|
| 118 |
+
prediction = response.choices[0].message.content.strip()
|
| 119 |
+
print (prediction)
|
| 120 |
|
| 121 |
# While the prediction is made, log both the inputs and outputs to a local log file
|
| 122 |
# While writing to the log file, ensure that the commit scheduler is locked to avoid parallel
|
|
|
|
| 137 |
|
| 138 |
# Set-up the Gradio UI
|
| 139 |
user_input = gr.Textbox (label = 'Query')
|
| 140 |
+
company_input = gr.Dropdown(
|
| 141 |
+
['aws','google','IBM','Meta','msft'],
|
| 142 |
+
label = 'company'
|
| 143 |
+
)
|
| 144 |
+
|
| 145 |
+
model_output = gr.Textbox (label = 'Response')
|
| 146 |
|
| 147 |
# Add text box and radio button to the interface
|
| 148 |
# The radio button is used to select the company 10k report in which the context needs to be retrieved.
|