successfulpm commited on
Commit
f6db76e
·
verified ·
1 Parent(s): 883a6dd

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -2
app.py CHANGED
@@ -4,14 +4,14 @@
4
  Automatically generated by Colab.
5
 
6
  Original file is located at
7
- https://colab.research.google.com/drive/1PkLAIGVP2xaP1XiU1KH9Bn4hO34hXe98
8
  """
9
 
10
  #/default_exp app
11
 
12
 
13
 
14
- #/export
15
  #from fastai.vision.all import *
16
  !pip install gradio
17
  import gradio as gr
@@ -44,3 +44,25 @@ intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=exa
44
  # Launch the interface with Inline=False to open in a separate window
45
  intf.launch(share=True)
46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  Automatically generated by Colab.
5
 
6
  Original file is located at
7
+ https://colab.research.google.com/drive/1KoR_JrJMqzUq-XagPaxVUp874bVW_qNI
8
  """
9
 
10
  #/default_exp app
11
 
12
 
13
 
14
+ #
15
  #from fastai.vision.all import *
16
  !pip install gradio
17
  import gradio as gr
 
44
  # Launch the interface with Inline=False to open in a separate window
45
  intf.launch(share=True)
46
 
47
+ !pip install nbdev
48
+
49
+ import os
50
+ os.listdir('/content')
51
+
52
+ import os
53
+ notebook_path = '/content/app.ipynb'
54
+ print(os.path.abspath(notebook_path))
55
+
56
+ import os
57
+ file_exists = os.path.isfile('/content/app.ipynb')
58
+ print(file_exists) # This should return True if the file exists
59
+
60
+ import os
61
+
62
+ # Extract the path of the current notebook in Colab
63
+ notebook_path = '/content/app.ipynb' # Replace with the actual path if different
64
+ print(f"Notebook is located at: {notebook_path}")
65
+
66
+ nbdev.export.nb_export('Copy of app.ipynb', 'app')
67
+ print('Export successful')
68
+