Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ import os
|
|
11 |
from langchain.llms import OpenAI
|
12 |
import gradio as gr
|
13 |
|
14 |
-
|
15 |
|
16 |
|
17 |
nlp = spacy.load('spacy_model')
|
@@ -254,10 +254,8 @@ def get_reviews(url):
|
|
254 |
#print(get_reviews(url))
|
255 |
|
256 |
|
257 |
-
|
258 |
-
|
259 |
-
interface = gr.Interface(fn=get_reviews, inputs=gr.Textbox(), outputs=gr.Textbox(label = 'Real ratings'), title='The Topic Magnet',
|
260 |
-
description='Enter the url of your Amazon reviews to get real ratings and valuable insights')
|
261 |
interface.launch()
|
262 |
#app.run(host = '0.0.0.0', debug = True, port = 5000)
|
263 |
|
|
|
11 |
from langchain.llms import OpenAI
|
12 |
import gradio as gr
|
13 |
|
14 |
+
os.environ["OPENAI_API_KEY"] = "sk-proj-flLYFFvadHYqGvN4u5l5T3BlbkFJ9dzQB92UqD08RaA7tYIM"
|
15 |
|
16 |
|
17 |
nlp = spacy.load('spacy_model')
|
|
|
254 |
#print(get_reviews(url))
|
255 |
|
256 |
|
257 |
+
interface = gr.Interface(fn=get_reviews, inputs=gr.Textbox(), outputs=[gr.Textbox(label = 'Real ratings'),gr.Textbox(label = 'Actionable insights')], title='The Topic Magnet',
|
258 |
+
description='Enter the url of your Amazon reviews to get real ratings and valuable insights')
|
|
|
|
|
259 |
interface.launch()
|
260 |
#app.run(host = '0.0.0.0', debug = True, port = 5000)
|
261 |
|