hassoudi commited on
Commit
9d5574c
·
verified ·
1 Parent(s): 0375d5f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -4
app.py CHANGED
@@ -1,7 +1,32 @@
1
  import gradio as gr
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
 
 
 
 
 
5
 
6
- demo = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- demo.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
 
3
+ def load_disclaimer():
4
+ return """
5
+ ⚠️ EDUCATIONAL VERSION
6
+ This demo implements the exact model you'll build in Chapter [6]
7
+ of the book "Natural Language Processing on Oracle Cloud Infrastructure: Building Transformer-Based NLP Solutions Using Oracle AI and Hugging Face".
8
+ For production solutions, contact us.
9
+ """
10
 
11
+ demo = gr.Interface(
12
+ fn=process_text,
13
+ inputs=gr.Textbox(
14
+ label="Try French Healthcare NER (Educational Version)",
15
+ placeholder="En cas d'infection bactérienne, le médecin recommande une antibiothérapie."
16
+ ),
17
+ outputs=gr.HTML(label="Entities Found"),
18
+ title="Educational French Healthcare NER | From the book 'Natural Language Processing on Oracle Cloud Infrastructure: Building Transformer-Based NLP Solutions Using Oracle AI and Hugging Face'",
19
+ description="""
20
+ 🎓 Educational Implementation
21
+ - Follows Chapters 4, 5 and 6 of the book"
22
+ - Perfect for learning NLP concepts
23
+ - Not for production use
24
+
25
+ Want to build this yourself?
26
+ Get the book: https://a.co/d/2soeB3b
27
+
28
+ Need a production solution?
29
+ Schedule a call: https://typica.ai/
30
+ """,
31
+ article=load_disclaimer()
32
+ )