Shamima commited on
Commit
97c7dfe
1 Parent(s): dda5b83

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -11,7 +11,7 @@ passw = os.environ.get('passw')
11
 
12
  # Connect to MindsDB Pro
13
 
14
- server = mindsdb_sdk.connect('https://cloud.mindsdb.com', login='[email protected]', password='TEMP017#', is_managed=True)
15
  project = server.get_project("mindsdb")
16
  model = project.list_models()[0]
17
 
@@ -21,7 +21,7 @@ def classify_text(text):
21
  data = pd.DataFrame(var, index=[0])
22
  result = model.predict(data)
23
  label = result['topic']
24
- score = result['score']
25
  return f"Label: {label}"
26
 
27
  # Create Gradio interface
@@ -30,7 +30,7 @@ iface = gr.Interface(
30
  inputs=gr.inputs.Textbox(label="Enter text to classify"),
31
  outputs="text",
32
  title="Identify spoiler comments with zero-shot text classification",
33
- description="Input a sentence here"
34
  )
35
 
36
  # Launch the interface
 
11
 
12
  # Connect to MindsDB Pro
13
 
14
+ server = mindsdb_sdk.connect('https://cloud.mindsdb.com', login=email, password=passw, is_managed=True)
15
  project = server.get_project("mindsdb")
16
  model = project.list_models()[0]
17
 
 
21
  data = pd.DataFrame(var, index=[0])
22
  result = model.predict(data)
23
  label = result['topic']
24
+ #score = result['score']
25
  return f"Label: {label}"
26
 
27
  # Create Gradio interface
 
30
  inputs=gr.inputs.Textbox(label="Enter text to classify"),
31
  outputs="text",
32
  title="Identify spoiler comments with zero-shot text classification",
33
+ description="Input a comment here"
34
  )
35
 
36
  # Launch the interface