Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,21 +1,20 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
|
| 3 |
-
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
df = pd.DataFrame({})
|
| 10 |
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
gr.Textbox(label="Industry"),
|
| 20 |
gr.Textbox(label="Company"),
|
| 21 |
gr.Textbox(label="Prospect Name"),
|
|
@@ -28,4 +27,4 @@ import gradio as gr
|
|
| 28 |
description="Generate personalized first-level outreach messages using a fine-tuned Gemma model."
|
| 29 |
)
|
| 30 |
|
| 31 |
-
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from inference_script import generate_outreach_message
|
| 3 |
+
import pandas as pd
|
| 4 |
|
| 5 |
+
try:
|
| 6 |
+
df = pd.read_csv('dataset.csv')
|
| 7 |
+
except FileNotFoundError:
|
| 8 |
+
df = pd.DataFrame({})
|
|
|
|
| 9 |
|
| 10 |
|
| 11 |
+
def predict_message(industry, company, prospect, designation, client_info, my_info):
|
| 12 |
+
message = generate_outreach_message(industry, company, prospect, designation, client_info, my_info)
|
| 13 |
+
return message
|
| 14 |
|
| 15 |
+
iface = gr.Interface(
|
| 16 |
+
fn=predict_message,
|
| 17 |
+
inputs=[
|
| 18 |
gr.Textbox(label="Industry"),
|
| 19 |
gr.Textbox(label="Company"),
|
| 20 |
gr.Textbox(label="Prospect Name"),
|
|
|
|
| 27 |
description="Generate personalized first-level outreach messages using a fine-tuned Gemma model."
|
| 28 |
)
|
| 29 |
|
| 30 |
+
iface.launch()
|