abhishek1992 commited on
Commit
4a4cf55
·
1 Parent(s): 55efd67

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,7 +4,7 @@ from transformers import pipeline
4
 
5
  pipe = pipeline("question-answering", model="deepset/roberta-large-squad2")
6
 
7
- def get_sentiment(input_text):
8
  context = '''Sun Ultra hardware and Solaris operating system technology are used to support all client server modules including human machine interface (HMI) and application clients. HMI client modules are also available on Intel systems running the Microsoft Windows operating system.
9
  The operational environment gives a common look and feel on all operating systems, combined with an “operate from anywhere” network connectivity to the SCADA database.
10
  SCADA system components are arranged redundantly to support very high availability platforms. Redundant components may include:Human Machine Interface (HMI),Front-End Processor (FEP),Database,Calculations,History,Communications,Networks and workstations.
@@ -50,7 +50,7 @@ A SCADA process monitor runs in each UNIX workstation to supervise and report on
50
  answer = pipe(question=input_text, context=context)
51
  return answer
52
 
53
- iface = gr.Interface(fn = get_sentiment,
54
  inputs = "text",
55
  outputs = ['text'],
56
  title = 'question-answering',
 
4
 
5
  pipe = pipeline("question-answering", model="deepset/roberta-large-squad2")
6
 
7
+ def get_answer(input_text):
8
  context = '''Sun Ultra hardware and Solaris operating system technology are used to support all client server modules including human machine interface (HMI) and application clients. HMI client modules are also available on Intel systems running the Microsoft Windows operating system.
9
  The operational environment gives a common look and feel on all operating systems, combined with an “operate from anywhere” network connectivity to the SCADA database.
10
  SCADA system components are arranged redundantly to support very high availability platforms. Redundant components may include:Human Machine Interface (HMI),Front-End Processor (FEP),Database,Calculations,History,Communications,Networks and workstations.
 
50
  answer = pipe(question=input_text, context=context)
51
  return answer
52
 
53
+ iface = gr.Interface(fn = get_answer,
54
  inputs = "text",
55
  outputs = ['text'],
56
  title = 'question-answering',