Tinsae commited on
Commit
5a39fd2
·
1 Parent(s): 34ba001

add app file

Browse files
app.py ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import numpy as np
3
+ from pathlib import Path
4
+
5
+ EXAMPLES_PATH = Path('./examples')
6
+
7
+ title = "Ethiopian Foods"
8
+ description = """
9
+ The bot was trained to answer questions based on Rick and Morty dialogues. Ask Rick anything!
10
+ """
11
+
12
+ article = "Check out [the original Rick and Morty Bot](https://huggingface.co/spaces/kingabzpro/Rick_and_Morty_Bot) that this demo is based off of."
13
+
14
+ def sepia(input_img):
15
+ sepia_filter = np.array(
16
+ [[0.393, 0.769, 0.189], [0.349, 0.686, 0.168], [0.272, 0.534, 0.131]]
17
+ )
18
+ sepia_img = input_img.dot(sepia_filter.T)
19
+ sepia_img /= sepia_img.max()
20
+ return gr.Video(value = "https://www.youtube.com/watch?v=i4HMxga-fxo&ab_channel=DailyStoic" )
21
+
22
+
23
+ examples = [f'{EXAMPLES_PATH}/{f.name}' for f in EXAMPLES_PATH.iterdir()]
24
+
25
+ demo = gr.Interface(sepia,
26
+ "image",
27
+ "video",
28
+
29
+ examples= examples,
30
+ title=title,
31
+ description=description,
32
+ article=article)
33
+
34
+ demo.launch()
examples/beyaynetu_0012.jpg ADDED
examples/beyaynetu_0013.jpg ADDED
examples/beyaynetu_0014.jpg ADDED
examples/beyaynetu_0024.jpg ADDED
examples/beyaynetu_0025.jpg ADDED
examples/beyaynetu_0026.jpg ADDED