riyanswat commited on
Commit
0f6febe
·
1 Parent(s): c04d97e

Add application file

Browse files
Files changed (2) hide show
  1. .ipynb_checkpoints/app-checkpoint.py +6 -0
  2. app.py +53 -0
.ipynb_checkpoints/app-checkpoint.py ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [],
3
+ "metadata": {},
4
+ "nbformat": 4,
5
+ "nbformat_minor": 5
6
+ }
app.py ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "id": "4bf3007b",
7
+ "metadata": {},
8
+ "outputs": [
9
+ {
10
+ "ename": "ModuleNotFoundError",
11
+ "evalue": "No module named 'gradio'",
12
+ "output_type": "error",
13
+ "traceback": [
14
+ "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
15
+ "\u001b[1;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
16
+ "Cell \u001b[1;32mIn [1], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mgradio\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mgr\u001b[39;00m\n\u001b[0;32m 3\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mgreet\u001b[39m(name):\n\u001b[0;32m 4\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mHello \u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;241m+\u001b[39m name \u001b[38;5;241m+\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m!!\u001b[39m\u001b[38;5;124m\"\u001b[39m\n",
17
+ "\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'gradio'"
18
+ ]
19
+ }
20
+ ],
21
+ "source": [
22
+ "import gradio as gr\n",
23
+ "\n",
24
+ "def greet(name):\n",
25
+ " return \"Hello \" + name + \"!!\"\n",
26
+ "\n",
27
+ "iface = gr.Interface(fn=greet, inputs=\"text\", outputs=\"text\")\n",
28
+ "iface.launch()"
29
+ ]
30
+ }
31
+ ],
32
+ "metadata": {
33
+ "kernelspec": {
34
+ "display_name": "Python 3 (ipykernel)",
35
+ "language": "python",
36
+ "name": "python3"
37
+ },
38
+ "language_info": {
39
+ "codemirror_mode": {
40
+ "name": "ipython",
41
+ "version": 3
42
+ },
43
+ "file_extension": ".py",
44
+ "mimetype": "text/x-python",
45
+ "name": "python",
46
+ "nbconvert_exporter": "python",
47
+ "pygments_lexer": "ipython3",
48
+ "version": "3.10.7"
49
+ }
50
+ },
51
+ "nbformat": 4,
52
+ "nbformat_minor": 5
53
+ }