SamiKoen commited on
Commit
938cc19
·
verified ·
1 Parent(s): 146864f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py CHANGED
@@ -1,11 +1,25 @@
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
 
 
3
 
4
  """
5
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
6
  """
7
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
 
 
 
 
 
8
 
 
 
 
 
 
 
 
9
 
10
  def respond(
11
  message,
 
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
+ import os
4
+
5
 
6
  """
7
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
8
  """
9
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
10
+ try:
11
+ os.makedirs("/mnt/data", exist_ok=True)
12
+ print("'/mnt/data' dizini başarıyla oluşturuldu veya zaten mevcut.")
13
+ except Exception as e:
14
+ print(f"Dizin oluşturulamadı: {e}")
15
 
16
+ # Test dosyası oluşturmayı dene
17
+ try:
18
+ with open("/mnt/data/test.txt", "w", encoding="utf-8") as f:
19
+ f.write("Test başarılı")
20
+ print("Test dosyası oluşturuldu.")
21
+ except Exception as e:
22
+ print(f"Test dosyası oluşturulamadı: {e}")
23
 
24
  def respond(
25
  message,